sqlite3 - CONDITION ON INSERT -
i have database contain name , properties of 2 different classes of files filled after server send client. that:
case when (select count() files_table_1 id="some id") not 0 (update files_table_1 set(...) id="some id") else (insert files_table_2 (...) values(...)) end;
but not work.
is there way that? thanks!
c++ has keyword if
situations this:
bool ok = query.exec("update ..."); ... if (query.numrowsaffected() == 0) { ok = query.exec("insert ..."); .... }
Comments
Post a Comment