On Mon, May 16, 2011 at 1:29 PM, Simon Slavin <slav...@bigfraud.org> wrote:
> Yet strangely, the ability to obtain the statements used to create the schema 
> is something I find very useful in quite a few utilities.  If you could 
> depend on them being in a standard format they'd be even more useful.

I like the fact that SQLite3 preserves almost all of the CREATE
statements as in the original (only the first two keywords, and
whitespace around them, change at all).

But I think I too would appreciate a normalized form of create
statements.  Even more so I'd appreciate a relational view of the
schema.  But that's just pipe dream stuff.

> MySQL has a way to obtain the data in statement form too.  Imagine a command 
> like
>
> SELECT AS INSERT COMMANDS * FROM myTable WHERE joinDate > '2001'
>
> which returns one field of text per record, with each piece of text being the 
> INSERT command required to reproduce it:
>
> INSERT INTO myTable (id,name,address,joinDate) VALUES (123,'Fred Savage','12 
> Rowantree Crescent','20020115')

The SQLite3 shell lets you do this.  Use .mode insert!  I agree it's awesome.

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

Reply via email to