Thursday, April 28, 2011

Inserting records with SQL Lite

What is the SQL Lite statement for "insert"?

I have tried

insert into table1 values(field1,field2) values (?,?)

but this returns an error in the statement -- how do I do this?

From stackoverflow
  • The correct syntax for the insert statement is here:

    INSERT INTO table (column1, [column2, ... ]) VALUES (value1, [value2, ...])
    

    Note that you have put the VALUES keyword before the list of column names.

    Brad Larson : If it works, you may want to accept the answer.

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.