November 19, 2014 at 8:23 pm
Comments posted to this topic are about the item Odd Man Out
November 19, 2014 at 11:02 pm
Thank you for the post, good one. My knowledge came back after selecting the wrong answer 🙂
ww; Raghu
--
The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.
November 20, 2014 at 12:37 am
I'd argue ROWCOUNT_BIG is an odd one as well, as it is not calculated over the current result set, but over the results of a previous query.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
November 20, 2014 at 12:43 am
ROWCOUNT_BIG returns the number of rows affected by the last statement all the others return values in the result set itself (Aggregate or sequential)..
for me ROWCOUNT_BIG was the odd one in this list.
November 20, 2014 at 12:55 am
Koen Verbeeck (11/20/2014)
I'd argue ROWCOUNT_BIG is an odd one as well, as it is not calculated over the current result set, but over the results of a previous query.
+1
And note BOL doesn't list @@ROWCOUNT, ROWCOUNT_BIG() among aggregates.
November 20, 2014 at 12:58 am
serg-52 (11/20/2014)
Koen Verbeeck (11/20/2014)
I'd argue ROWCOUNT_BIG is an odd one as well, as it is not calculated over the current result set, but over the results of a previous query.+1
And note BOL doesn't list @@ROWCOUNT, ROWCOUNT_BIG() among aggregates.
It does in the 2008R2 version of that MSDN page.
So apparently MS realized it is a mistake to list ROWCOUNT_BIG as an aggregate.
Hence, the "correct" answer of this question is based on a mistake MS made 4 years ago.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
November 20, 2014 at 1:27 am
ROWCOUNT_BIG() differs from @@rowcount only from the type.
So, ROWCOUNT_BIG() is the correct answer. All other functions may be followed by the OVER clause.
November 20, 2014 at 1:27 am
This was removed by the editor as SPAM
November 20, 2014 at 2:02 am
I sure did a smart thing by adding the SQL SERVER 2008 R2 reference. Once again the question section works for me not in form of answers but the discussion that follows.
November 20, 2014 at 2:03 am
Stewart "Arturius" Campbell (11/20/2014)
I think this is going to be an interesting discussion.
All in good fun, anyway:-P
+1
November 20, 2014 at 4:17 am
I strongly think that ROWCOUNT_BIG is Odd man out here :alien:
November 20, 2014 at 5:14 am
GROUPING_ID was introduced in SQL2008. The others were all available in SQL2005.
November 20, 2014 at 5:19 am
Toreador (11/20/2014)
GROUPING_ID was introduced in SQL2008. The others were all available in SQL2005.
And VARP is the only function with a name less than 5 characters! :w00t: 😎 :hehe:
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
November 20, 2014 at 5:36 am
As others have pointed out, there are other differences. I was hoping that the functional difference I noticed was the one he was looking for. In any even, the discussion could get lively.
November 20, 2014 at 5:49 am
Agreed
Viewing 15 posts - 1 through 15 (of 30 total)
You must be logged in to reply to this topic. Login to reply