INSERT INTO t1 SELECT 1 UNION SELECT 2 UNION (...) SELECT 9999;
It works out of the box on any DBMS you care to name, and of course in
SQLite, too. It is ever so slightly verbose, but better than the
alternative of executing 9999 INSERT INTO t1 VALUES(###);
Cheers,
-Tiago
On Mon, Jan 13, 2014 at 3:21 PM, big stone <[email protected]> wrote:
> Hello,
>
> I read the source code of sqlite and I find a lot of :
>
>
> CREATE TABLE t1(x INTEGER);
> INSERT INTO t1 VALUES(1);INSERT INTO t1 VALUES(2);
> ....
>
> Wouldn't it be both an economy of coding time and a more quick upload
> process to allow Multiple inserts SYNTAX ?
>
> like :
> INSERT INTO t1 VALUES(1),(2), .... (9999);
>
> I'm not 100% certain it's in SQL standard, but the syntax seems ok for
> SQL Server , Oracle , and POSTGRESQL at least.
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
--
In those days, in those distant days, in those nights, in those remote
nights, in those years, in those distant years...
- Gilgamesh, Enkidu and the Underworld
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users