SQLite import from .csv file
Here are the quick and easy steps to import the contents of a .csv file into your SQLite3 database.
Open the db via the command line:
Enter the following commands:
And that's it. If your .csv file has a different separator character, just replace the comma with your character.
Open the db via the command line:
sqlite3 myDatabaseName
Enter the following commands:
.separator "," .import myFile.csv tblMyTable
And that's it. If your .csv file has a different separator character, just replace the comma with your character.
1 Comments:
So if I have a mySQL database and I export it using a util like PHPMyAdmin into a CSV file, I can import it into SQLite this easily?? Would I have to pre-set up the tables in SQLite first?
By scotts7777, At April 4, 2012 at 4:42 PM
Post a Comment
Subscribe to Post Comments [Atom]
<< Home