Hi need insert data in table if the record is not already exits
Ex:
IF NOT EXISTS (SELECT Id FROM table WHERE id=_Id) THEN
INSERT INTO tbale(…..)
This can be easily done using stored procedure in MySql. But I want to d same thing in SQLite by writing a single query statement.
Pleas help
INSERT INTO CategoryMaster (CategoryID, CategoryText) SELECT %d,’%@’ WHERE NOT EXISTS (SELECT 1 FROM CategoryMaster WHERE CategoryID= %d)
Its working for me 🙂