This works -
char *stmnt = "UPDATE systab SET sys_state = "
"(SELECT sys_state FROM systab WHERE item_id = 'NEXT_BATCH_ID') + 1 "
"WHERE item_id = 'NEXT_BATCH_ID';";
Deepak Kaul wrote:
I have an addition question. Is is possible to increment a value in an
update statement? If so how
Hello Deepak,
your example is valid SQL. I have tried it and it works in sqlite (of
course).
Martin
Martin
Deepak Kaul wrote:
I have an addition question. Is is possible to increment a value in
an update statement? If so how would the sql statement be written?
For example
Table addition
I have an addition question. Is is possible to increment a value in an
update statement? If so how would the sql statement be written?
For example
Table addition with the following columns
unique_id, count
I want something like the following
UPDATE addition SET count = count + 1 WHERE unique_
3 matches
Mail list logo