|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, March 18, 2013 7:54 AM
Points: 142,
Visits: 414
|
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 3:04 PM
Points: 5,101,
Visits: 20,200
|
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 12:39 PM
Points: 1,662,
Visits: 1,708
|
|
Nice question, I liked that it is clean and straightforward, no tricks. The column names in that table of yours are not very nice though. 
Oleg
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 11:21 AM
Points: 2,163,
Visits: 2,148
|
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 2:53 AM
Points: 1,527,
Visits: 359
|
|
a very good question... thanks
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Saturday, February 02, 2013 5:42 AM
Points: 190,
Visits: 74
|
|
| nice!! but tough to concentrate........
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Tuesday, March 27, 2012 12:08 PM
Points: 1,073,
Visits: 51
|
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Today @ 10:28 AM
Points: 534,
Visits: 594
|
|
Nice question. You got me with the last SELECT setting the value to 1. I thought it returned 0.
"Beliefs" get in the way of learning.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, May 30, 2012 1:50 AM
Points: 143,
Visits: 79
|
|
| Can anyone explain me, how does it return '1' as the last rowcount???
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 10:54 AM
Points: 356,
Visits: 753
|
|
sakthi_madan,
Run in query analyser:
SELECT @@ROWCOUNT SELECT @@ROWCOUNT
The first statement returns a row with 0 The second statement is the count of rows returned from the first, i.e 1 row of 0.
Hope that makes sense.
I got the answer wrong as well... so close yet so far. Good question.
Kev
|
|
|
|