This example shows how to insert a record in an SQL table only if it does not currently exist.

if not exists
 (SELECT * FROM TEST_Table
 WHERE Center = '8882'
 AND Drive = 'K' AND Path = '\\DEV2\WORKGROUP')
 INSERT INTO TEST_Table (Center, Drive, Path, Comment)
 VALUES ('8882','K','\\DEV2\WORKGROUP','Stage Layout')

SQLite syntax:

INSERT OR REPLACE INTO topics (tag, topic) 
SELECT 'GEN:03', 'THE FALL'
WHERE NOT EXISTS 
 (SELECT * FROM topics WHERE tag = 'GEN:03' AND topic = 'THE FALL');