On 5/2/2013 10:45 AM, Simon Slavin wrote:
I know of the reluctance among the SQLite programmers to add features to the 
intentionally 'lite' product, but I am coming to the conclusion that having 
this feature in the standard code base will be of great convenience to a lot of 
users.

I would like the introduction of a command which changes a SELECT the same way 
EXPLAIN QUERY PLAN changes a SELECT.  This one should take the SELECT and 
instead of producing a table, sometimes with many columns, produces a 1 column 
table with the SELECTed data shown as INSERT commands, with values correctly 
single-quoted where necessary.

Why? What's the point of the exercise? How would you use this beast if you had it?

In any case, it's not clear why the implementation must live inside the engine. SQLite API provides sufficient information for you to be able to pull this off within the host application, if you are so inclined.

Alternatively a completely different syntax could be used which looks nothing 
like a SELECT statement, one where you had to specify a table, and could 
optionally specify a list of columns, something like

LIST INSERTS FOR myTable FOR COLUMNS *
LIST INSERTS FOR myTable FOR COLUMNS (id, player, team, time)

Are you perhaps looking for .dump command of sqlite3 console?
--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to