Results 1 to 2 of 2

Thread: Multiple Inserts with SQLite

  1. #1

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Multiple Inserts with SQLite

    With mySQL I can use the below to insert many rows at once however I have not been able to do this using SQLite. Does anyone know if it's possible?

    Code:
    INSERT INTO TableName (col1,col2) 
    values(val1,val2),
    (val3,val4),
    (val5,val6)

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Multiple Inserts with SQLite

    That method is unusual, most database systems only allow you to use a Select statement, eg:
    Code:
    INSERT INTO TableName (col1,col2) 
    SELECT col, col2
    FROM OtherTable

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width