March 9, 2015 at 10:58 am
Xavon (3/9/2015)
RLilj33 (3/9/2015)
This one threw me off. Can someone explain BOL (https://msdn.microsoft.com/en-us/library/ms189838.aspx):"data_type
Is the data type of the identity column. Valid data types for an identity column are any data types of the integer data type category, except for the bit data type, or decimal data type."
Thanks.
That sentence is a little tough the parse, but think of it like:
Valid data types for an identity column are (any data types of the integer data type category, except for the bit data type) or (decimal data type).
That still does not include numeric, but gets it closer.
I call it "Microsoft clarity." 😉
Thanks for the question.
March 9, 2015 at 11:07 am
Xavon (3/9/2015)
RLilj33 (3/9/2015)
This one threw me off. Can someone explain BOL (https://msdn.microsoft.com/en-us/library/ms189838.aspx):"data_type
Is the data type of the identity column. Valid data types for an identity column are any data types of the integer data type category, except for the bit data type, or decimal data type."
Thanks.
That sentence is a little tough the parse, but think of it like:
Valid data types for an identity column are (any data types of the integer data type category, except for the bit data type) or (decimal data type).
That still does not include numeric, but gets it closer.
Thanks for the clarification, Xavon
March 9, 2015 at 2:55 pm
RLilj33 (3/9/2015)
This one threw me off. Can someone explain BOL (https://msdn.microsoft.com/en-us/library/ms189838.aspx):"data_type
Is the data type of the identity column. Valid data types for an identity column are any data types of the integer data type category, except for the bit data type, or decimal data type."
Thanks.
That statement in BOL is interpreted by some people as meaning one thing and by other people as meaning another. People who think that the commas represent pauses in speech that indicate meaning will parse it as "(integer types except bit) or decimal type". People who want to find an interpretation of "integer data type category" that exactly matches some well defined term used in the SQL definition have been known to claim that that phrase means "exact numeric types" so that it should be parsed as "integer types except (bit or decimal type)". Since "numeric data type" (as opposed to "exact numeric data type") is a synonym of "decimal data type" the first parsing delivers almost the correct meaning (to be completely correct it needs a constraint on the scale of the decimal type), while the second parsing delivers something that is horribly wrong.
While there are plenty of errors in BOL, I suspect that here the small error (forgetting to mention the scale) is what this page has, not the big error (claiming that decimal [aka numeric] can never be used for identity columns).
Tom
March 9, 2015 at 2:57 pm
Well, if it were a conjunctional type of list there would be no comma, meaning both items were included in the exception. Not that English, grammar, etc, were exactly my strongest suits, but wasn't my weakest either, by any stretch.
March 10, 2015 at 7:27 am
TomThomson (3/7/2015)
This is a rather early repeat! We had an identical question on Jan 13th, less than 2 months ago; and then on Jan 20th we had another question for which the answer to this one was the first part of the explanation.So a nice easy question, and it will be rather disappointing if the correct answers end up much below 100%.
I was not around for the earlier question, but still found this easy.
Not only is the content easy, but even if you didn't know it would be easy to guess.
March 17, 2015 at 12:44 pm
Nevyn (3/10/2015)
TomThomson (3/7/2015)
This is a rather early repeat! We had an identical question on Jan 13th, less than 2 months ago; and then on Jan 20th we had another question for which the answer to this one was the first part of the explanation.So a nice easy question, and it will be rather disappointing if the correct answers end up much below 100%.
I was not around for the earlier question, but still found this easy.
Not only is the content easy, but even if you didn't know it would be easy to guess.
So it was repeated. Those who got it wrong the first time had another chance to get it right this time. Wonder how many got it wrong both times...
Not all gray hairs are Dinosaurs!
March 17, 2015 at 8:01 pm
Miles Neale (3/17/2015)
Nevyn (3/10/2015)
TomThomson (3/7/2015)
This is a rather early repeat! We had an identical question on Jan 13th, less than 2 months ago; and then on Jan 20th we had another question for which the answer to this one was the first part of the explanation.So a nice easy question, and it will be rather disappointing if the correct answers end up much below 100%.
I was not around for the earlier question, but still found this easy.
Not only is the content easy, but even if you didn't know it would be easy to guess.
So it was repeated. Those who got it wrong the first time had another chance to get it right this time. Wonder how many got it wrong both times...
We've still got 41% getting it wrong this time round.
Tom
March 18, 2015 at 9:39 am
TomThomson (3/17/2015)
Miles Neale (3/17/2015)
Nevyn (3/10/2015)
TomThomson (3/7/2015)
This is a rather early repeat! We had an identical question on Jan 13th, less than 2 months ago; and then on Jan 20th we had another question for which the answer to this one was the first part of the explanation.So a nice easy question, and it will be rather disappointing if the correct answers end up much below 100%.
I was not around for the earlier question, but still found this easy.
Not only is the content easy, but even if you didn't know it would be easy to guess.
So it was repeated. Those who got it wrong the first time had another chance to get it right this time. Wonder how many got it wrong both times...
We've still got 41% getting it wrong this time round.
If we run it again in two or three months do you think that will go up or down?
Not all gray hairs are Dinosaurs!
March 18, 2015 at 8:33 pm
Miles Neale (3/18/2015)
TomThomson (3/17/2015)
Miles Neale (3/17/2015)
Nevyn (3/10/2015)
TomThomson (3/7/2015)
This is a rather early repeat! We had an identical question on Jan 13th, less than 2 months ago; and then on Jan 20th we had another question for which the answer to this one was the first part of the explanation.So a nice easy question, and it will be rather disappointing if the correct answers end up much below 100%.
I was not around for the earlier question, but still found this easy.
Not only is the content easy, but even if you didn't know it would be easy to guess.
So it was repeated. Those who got it wrong the first time had another chance to get it right this time. Wonder how many got it wrong both times...
We've still got 41% getting it wrong this time round.
If we run it again in two or three months do you think that will go up or down?
Oh.please don't ask that question - I'm scared that the correct answer may be the wrong one. If something this simple can't be taught ...
On of the reasons I look at QotD is that I think people will learn from it. Otherwise the questions I generate (and those of my comments which I believe will help people understand SQL) are pretty worthless. I want to believe that qotD and comments on it are useful.
Tom
Viewing 9 posts - 16 through 23 (of 23 total)
You must be logged in to reply to this topic. Login to reply