• GilaMonster (10/12/2010)


    It's more general than that. It's just about every statement.

    SELECT * FROM master.sys.objects -- 74 rows

    IF (1=1)

    SELECT @@ROWCOUNT AS RowsAffected -- 0, because the IF did not affect any rows

    wow i did not know that even an IF statement affects it! thanks once again Gail!

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!