SQLite Query to Insert a record If not exists

Posted by Tharindu Madushanka on Stack Overflow See other posts from Stack Overflow or by Tharindu Madushanka
Published on 2010-05-06T09:06:51Z Indexed on 2010/05/06 9:18 UTC
Read the original article Hit count: 213

Filed under:
|

I want to insert a record into a sqlite table if its actually not inserted.

Let's say it has three fields pk, name, address

I want to INSERT new record with name if that name not added preveously.

Can we do with this in a single Query. Seems like its slightly different from SQL Queries sometimes.

Thanks you,

Tharindu Madushanka

© Stack Overflow or respective owner

Related posts about sqlite

Related posts about query