I need to delete a row based on the value in a column when executing an update request. Here is the code:
UPDATE tag SET tag_count = tag_count - 1 WHERE tag_id = 1 IF tag_count < 1 delete from tag where tag_id = 1
This query here gives me an error.
EDIT I use embedded sql with C # and sql servers
source share