December 30, 2014 at 3:08 pm
I thought it was the max length problem.
December 30, 2014 at 5:13 pm
Yet another way to cheat... and learn some new languages in the process 😀
SELECT *
FROM sys.messages
WHERE message_id = 2714
December 30, 2014 at 10:29 pm
status is showing blue in Sql server 2012 :p
December 30, 2014 at 10:59 pm
Rich Weissler (12/30/2014)
Hany Helmy (12/30/2014)
Wow :w00t: 41% didn`t know about the "Extra comma in column list" will not prevent you from creating a table.I didn't. And after a few hundred "Incorrect syntax near ','" from Select statements with an extra trailing comma and learning not to put that extra comma in... I don't even feel bad about not knowing. 🙂
It`s always good 2 learn new things 🙂
Thanks & Best Regards,
Hany Helmy
SQL Server Database Consultant
December 30, 2014 at 11:05 pm
t.pratiksha (12/30/2014)
status is showing blue in Sql server 2012 :p
As mentioned in the explanation, it`s not a reserverd word although showing as blue.
Thanks & Best Regards,
Hany Helmy
SQL Server Database Consultant
December 30, 2014 at 11:10 pm
Geoscrewed (12/30/2014)
Yet another way to cheat... and learn some new languages in the process 😀
SELECT *
FROM sys.messages
WHERE message_id = 2714
and language_id = 1033
😉
Thanks & Best Regards,
Hany Helmy
SQL Server Database Consultant
December 31, 2014 at 7:44 am
Rich Weissler (12/30/2014)
Hany Helmy (12/30/2014)
Wow :w00t: 41% didn`t know about the "Extra comma in column list" will not prevent you from creating a table.I didn't. And after a few hundred "Incorrect syntax near ','" from Select statements with an extra trailing comma and learning not to put that extra comma in... I don't even feel bad about not knowing. 🙂
+1 Learned something today. 😀
December 31, 2014 at 8:21 am
I missed it, but at least I was in good company.
January 2, 2015 at 2:33 am
Hany Helmy (12/30/2014)
Wow :w00t: 41% didn`t know about the "Extra comma in column list" will not prevent you from creating a table.
Why would you expect people to know this? It's sloppy coding. I only know it because it was mentioned in another QotD a while back 🙂
I was expecting one of the available answers to be that the Drop Table failed because of a foreign key error.
January 3, 2015 at 5:30 am
Great question, thanks.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
January 6, 2015 at 3:37 am
ha ha ..... I missed it.
January 20, 2015 at 6:15 am
Toreador (1/2/2015)
Hany Helmy (12/30/2014)
Wow :w00t: 41% didn`t know about the "Extra comma in column list" will not prevent you from creating a table.Why would you expect people to know this? It's sloppy coding. I only know it because it was mentioned in another QotD a while back 🙂
I was expecting one of the available answers to be that the Drop Table failed because of a foreign key error.
I didn't know you could do this either, but I disagree that it's sloppy coding. It's actually more balanced visually, makes it really easy when you are using dynamic SQL or some other language to generate SQL (don't have to treat the last column definition in a special way, or worry about a constraint or key definition needing a comma prior or not).
It's also allowed in c#, for example in an enumeration.
I would have failed first day as Steve's intern!
April 20, 2016 at 7:25 am
All good lessons on this one. Thanks for detailing them all out.
Viewing 13 posts - 16 through 27 (of 27 total)
You must be logged in to reply to this topic. Login to reply