[EMAIL PROTECTED] wrote: > > Hi, > Is there a way to export/dump SQLite data into INSERT statements which > also have column names? > > As of now, a sqlite dump looks like this > > INSERT INTO "ric_tb_language" VALUES('ENG','English'); > INSERT INTO "ric_tb_language" VALUES('SPN','Spanish'); > INSERT INTO "ric_tb_language" VALUES('GER','German'); > > Is it possible to have it like below(column names included)? > > INSERT INTO "ric_tb_language" (ID, language) VALUES('ENG','English'); > INSERT INTO "ric_tb_language" (ID, language) VALUES('SPN','Spanish'); > INSERT INTO "ric_tb_language" (ID, language) VALUES('GER','German' );
You might find the impexp.c source file in the SQLite ODBC driver on http://www.ch-werner.de/sqliteodbc useful for this purpose. It implements some SQLite 3 extension functions. The export_sql() function should produce your desired output format if invoked as select export_sql('filename', 1, 'ric_tb_language'); HTH, Christian _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users