请教sqlite on conflict 的语法
请假一下大家的语法,sqlite上说on conflict 的语法是这样:
ON CONFLICT子句
conflict-clause ::= ON CONFLICT conflict-algorithm
conflict-algorithm ::= ROLLBACK | ABORT | FAIL | IGNORE | REPLACE
我的sql语句是这样:
insert [or (exists(select * from stuff where ID=0)) ignore ] into [stuff] (ID, name, name1, name2) values (0,"text", null, null);
然后报有语法错误。
我的意图是,当 table stuff 里面有ID=0的记录的时候就插入,否则什么也不干。。
求大家给出正确的写法~~