Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Defaults


Defaults

Author
Message
Lon-860191
Lon-860191
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1887 Visits: 278
Good, easy question.
Thanks
Hugo Kornelis
Hugo Kornelis
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8297 Visits: 11538
Roland Alexander STL (11/15/2012)
No, I don't believe I'm confused. Have a look at the list at http://msdn.microsoft.com/en-us/library/ms143729.aspx where you'll find this entry:

Use of DEFAULT keyword as default value.
Do not use the word DEFAULT as a default value.

under "Not Supported In A Future Version of SQL Server".

Now, it may be that I misread this, but I'm hard-pressed to see how. Nonetheless I would be quite happy to be shown wrong.


It toook me a lot of digging to get to the bottom of this. But finally, I stumbled upon a Connect item filed against this specific text in Books Online, back in 2007. Link: http://connect.microsoft.com/SQLServer/feedback/details/293052/incorrect-depreaction-use-of-default-keyword-as-default-value.
Apparently, Microsoft wants to deprecate using the literal text 'DEFAULT' as a default value. Exactly why they want to do that is not clear, nor why, five years later, the wording has still not been clarified - but at least we can all heave a sigh of relief, knowing that Microsoft is not going to deprecate the ANSI-standard usage of syntax values. They are "only" going to outlaw one specific, randomly chosen value.
(By the way, when thinking about this issue I can't help wondering what will happen in localized versions of SQL Server - will the Japanese version accept the string 'DEFAULT' but produce an error on the Japanese translation of that word? This looks like a very random idea to me!)


Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Ken Wymore
Ken Wymore
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

Group: General Forum Members
Points: 4416 Visits: 2342
Nice question. I had never actually used the DEFAULT keyword in an insert statement before or seen it used. I have used default constraints many times but never considered doing something like;

INSERT INTO #QOTD VALUES(1,DEFAULT) or UPDATE #QOTD SET WithDefault = DEFAULT.
Roland Alexander STL
Roland Alexander STL
Mr or Mrs. 500
Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)

Group: General Forum Members
Points: 517 Visits: 382
Hugo Kornelis (11/15/2012)
Roland Alexander STL (11/15/2012)
No, I don't believe I'm confused. Have a look at the list at http://msdn.microsoft.com/en-us/library/ms143729.aspx where you'll find this entry:

Use of DEFAULT keyword as default value.
Do not use the word DEFAULT as a default value.

under "Not Supported In A Future Version of SQL Server".

Now, it may be that I misread this, but I'm hard-pressed to see how. Nonetheless I would be quite happy to be shown wrong.


It toook me a lot of digging to get to the bottom of this. But finally, I stumbled upon a Connect item filed against this specific text in Books Online, back in 2007. Link: http://connect.microsoft.com/SQLServer/feedback/details/293052/incorrect-depreaction-use-of-default-keyword-as-default-value.
Apparently, Microsoft wants to deprecate using the literal text 'DEFAULT' as a default value. Exactly why they want to do that is not clear, nor why, five years later, the wording has still not been clarified - but at least we can all heave a sigh of relief, knowing that Microsoft is not going to deprecate the ANSI-standard usage of syntax values. They are "only" going to outlaw one specific, randomly chosen value.
(By the way, when thinking about this issue I can't help wondering what will happen in localized versions of SQL Server - will the Japanese version accept the string 'DEFAULT' but produce an error on the Japanese translation of that word? This looks like a very random idea to me!)


LOL! Random is right! Thanks, Hugo, for digging into this and clearing the matter up. Much appreciated. I wonder why MS hasn't clarified the matter on the deprecation page...

Roland Alexander
The Developing World


There are two means of refuge from the miseries of life: music and cats. ~ Albert Schweitzer
TomThomson
TomThomson
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10658 Visits: 11991
Good basics question, nice and easy.

Interesting discussion on the deprecation of 'DEFAULT' used as a default value; I can't imagine a more lunatic restriction myself, and I see Hugo's amusing question about the Japanese version as being relevant to just about every other language which is supprted for SQL Server.

Tom

Revenant
Revenant
SSCertifiable
SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)

Group: General Forum Members
Points: 5760 Visits: 4704
Thanks for an easy basics question, Ken!
SQLRNNR
SQLRNNR
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21049 Visits: 18258
Thanks for the question.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Olga B
Olga B
Mr or Mrs. 500
Mr or Mrs. 500 (596 reputation)Mr or Mrs. 500 (596 reputation)Mr or Mrs. 500 (596 reputation)Mr or Mrs. 500 (596 reputation)Mr or Mrs. 500 (596 reputation)Mr or Mrs. 500 (596 reputation)Mr or Mrs. 500 (596 reputation)Mr or Mrs. 500 (596 reputation)

Group: General Forum Members
Points: 596 Visits: 455
Nice and easy afternoon question, here. Smile
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16366 Visits: 13199
Great question, thanks Kenneth.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16366 Visits: 13199
ronmoses (11/15/2012)
Dag-nabbit, that'll teach me to read more carefully. I read it as "how many" and not "which"! Duh. Well at least I got it right in my head. ;-)

Ron


Ah, I'm not the only one :-D
I was thinking: "why on earth are those checkboxes instead of a radio button?" :-)



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search