|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Thursday, March 14, 2013 4:15 AM
Points: 3,240,
Visits: 4,960
|
|
The result of the first Select @@RowCount depends upon the last query executed in the session. I tried it in different ways;
1. Executed query that returned n number of rows and then executed the two statements and the result was (n,1)
2. I executed print '1' statement and then executed the two statements and the the result was (0,1).
but the BOTTOM LINE is ....
Lost my point....
---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sometimes, winning is not an issue but trying. You can check my BLOG here
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Yesterday @ 7:18 PM
Points: 10,989,
Visits: 10,532
|
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Thursday, January 10, 2013 4:43 AM
Points: 803,
Visits: 55
|
|
the result depends on previous statement.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, June 23, 2010 4:42 AM
Points: 125,
Visits: 5
|
|
| I also executed the query in sql server 2005 query analyzer but i got (0,1) as the output.
|
|
|
|