IF-оператор в SQLite: обновить или вставить?

Я не могу выполнить этот запрос с помощью SQLite

if 0<(select COUNT(*) from Repetition where (Word='behnam' and Topic='mine'))
begin
 update Repetition set Counts=1+ (select Counts from Repetition where (Word='behnam' and Topic='mine'))
end
else
begin
    insert Repetition(Word,Topic,Counts)values('behnam','mine',1)
end

] Он говорит: «Синтаксическая ошибка рядом с IF» Как решить проблему

6
задан Behnam-s 22 October 2011 в 18:55
поделиться