I am using SQLite database.
I want to insert id value
or url Value
if id Value
not exists, but there is no support of IF() function, how should I write it with SQL CASE statement?
require 'sqlite3'
$db.execute("
IF NOT EXISTS(select * from table WHERE id='123456')
BEGIN
INSERT INTO sap(id,url) VALUES('123456', 'https:/test.com');
END;")
Any help would be appreciated,
Thanks!