csv2sql
Convert CSV to SQL.
csv2sql [-update] [-insert] [-o outputfile] tablename [csvfilename]
Convert a CSV file into SQL statements - either INSERT or UPDATE statements - for the named table.
Option |
Description |
-update |
Output SQL statements will be formulated as UPDATE statements. |
-insert |
Output SQL statements will be formulated as INSERT statements. This is the default. |
-o outputfile |
Specify outputfile as the place to put the output. The default is to output to stdout. |
tableName |
Specify the output file, e.g. filename.sql. The default is to output to stdout. |
csvfilename |
Specify the CSV input file. By default, CSV input comes from stdin. |