Re: [sqlite] INSERT vs BEGIN

2019-09-04 Thread Clemens Ladisch
Rob Richardson wrote: > I didn't know it is possible to insert multiple rows into a table using a > command like this. Is this just an SQLite feature, or is this part of the > SQL standard? This is defined since SQL-92, but only at the Full SQL conformance level. Regards, Clemens

Re: [sqlite] INSERT vs BEGIN

2019-09-03 Thread Richard Damon
On 9/3/19 7:18 AM, Dominique Devienne wrote: > On Tue, Sep 3, 2019 at 12:03 PM Rob Richardson > wrote: > >> I didn't know it is possible to insert multiple rows into a table using a >> command like this. > > Added over 7 years ago: See > https://www.sqlite.org/changes.html#version_3_7_11 #1 > >

Re: [sqlite] INSERT vs BEGIN

2019-09-03 Thread Dominique Devienne
On Tue, Sep 3, 2019 at 12:03 PM Rob Richardson wrote: > I didn't know it is possible to insert multiple rows into a table using a > command like this. Added over 7 years ago: See https://www.sqlite.org/changes.html#version_3_7_11 #1 > Is this just an SQLite feature, or is this part of the

Re: [sqlite] INSERT vs BEGIN

2019-09-03 Thread Rob Richardson
I didn't know it is possible to insert multiple rows into a table using a command like this. Is this just an SQLite feature, or is this part of the SQL standard? RobR On Mon, Sep 2, 2019 at 8:14 AM Dominique Devienne wrote: > On Mon, Sep 2, 2019 at 12:52 PM Simon Slavin wrote: > > > > One

Re: [sqlite] INSERT vs BEGIN

2019-09-02 Thread Dominique Devienne
On Mon, Sep 2, 2019 at 12:52 PM Simon Slavin wrote: > > One must know that I am obliged to use "BEGIN DEFERRED TRANSACTION" > because others threads needs to access to tables. > SQLite copes very well when you have one connection writing to the > database and other connections reading. The

Re: [sqlite] INSERT vs BEGIN

2019-09-02 Thread Dominique Devienne
On Mon, Sep 2, 2019 at 12:04 PM Grincheux <51...@protonmail.ch> wrote: > What is the best ? > > INSERT INTO artists (name) VALUES > ("Gene Vincent") ... > ("Moi _ Me"); > You're missing commas. And you should not use double-quotes but single-quotes for string-literals. > I want to insert 1 000

Re: [sqlite] INSERT vs BEGIN

2019-09-02 Thread Simon Slavin
On 1 Sep 2019, at 7:27am, Grincheux <51...@protonmail.ch> wrote: > INSERT INTO artists (name) VALUES > ("Gene Vincent") > ("John Lennon") > ("Ringo Starr") > ("Paul McCartney") > . > . > . > ("Moi _ Me"); > > I want to insert 1 000 000 records. SQLite has to parse the entire command line before

[sqlite] INSERT vs BEGIN

2019-09-02 Thread Grincheux
What is the best ? INSERT INTO artists (name) VALUES ("Gene Vincent") ("John Lennon") ("Ringo Starr") ("Paul McCartney") . . . ("Moi _ Me"); I want to insert 1 000 000 records. The other manner tot do is creating a transaction with one insert command by line. My question is what is the best