[thelist] SQL Server & Stored Procedures

Beau Hartshorne beau at cubeinc.ca
Mon Oct 29 19:21:39 CST 2001


I have a stored procedure that looks something like this:

DELETE FROM NEWS_COMMENTS_DEV WHERE comment_id = @comment_id
UPDATE NEWS_ARTICLES_DEV SET a_comments = a_comments - 1 WHERE news_id =

I would like to execute the UPDATE statement only if the DELETE command
managed to delete something. So what's the best way to do this?



More information about the thelist mailing list