I need to delete a row based upon the value in a column while executing an update query. 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 am using inline sql with C# and sql server