November 23, 2015 at 9:10 pm
Comments posted to this topic are about the item The dotted table
November 23, 2015 at 9:36 pm
Nice question.
But your "not necessarily recommended" is a bit less emphatic than my expression would be if I encountered something like this in a code review. :rolleyes:
Tom
November 23, 2015 at 10:19 pm
Nice simple question, valid it may be but certainly not to be recommended. Thanks Steve.
...
November 24, 2015 at 12:30 am
TomThomson (11/23/2015)
Nice question.But your "not necessarily recommended" is a bit less emphatic than my expression would be if I encountered something like this in a code review. :rolleyes:
+1
😎
Certainly drop the code most probably something else along with it........
November 24, 2015 at 1:27 am
Easy one, thanks.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
November 24, 2015 at 1:41 am
Yes valid, but definitely not recommended, I hope that MS will prevent this code from being created by mistake in future releases.
Thanks & Best Regards,
Hany Helmy
SQL Server Database Consultant
November 24, 2015 at 2:05 am
According to Chambers Dictionary, the definition of "wrong" includes:
"not appropriate or suitable"
"not good or sensible; unjustifiable"
"amiss, causing trouble, pain, etc"
"not socially acceptable"
I think you could make a case for the "dotted table" being wrong on all these counts!
November 24, 2015 at 2:14 am
The correct answer is missing: "The table doesn't have a primary key". It's also suspect that all columns are nullable.
From the answer options I deduced that I needed to focus on the table name only; perhaps you can change the question text to reflect that?
November 24, 2015 at 4:53 am
I have to agree with Tom. It may be valid, but is certainly not recommended and it would never survive a review.
November 24, 2015 at 6:45 am
I tried creating a #table and it didn't like the periods.
November 24, 2015 at 7:33 am
Iwas Bornready (11/24/2015)
I tried creating a #table and it didn't like the periods.
The # needs to be inside the brackets
CREATE TABLE [#this.is.a.test]
November 24, 2015 at 7:35 am
Maybe "What's wrong with this table?" should be change to something like "What's wrong with the syntax of this statement to create a table"?
November 24, 2015 at 7:43 am
The following will also work
CREATE TABLE [.[[.[[.[[.]].]].]].]]]
( myid INT
, mychar VARCHAR(200)
);
or
CREATE TABLE [[[[[[[]]]]]]]]]
( myid INT
, mychar VARCHAR(200)
);
or
CREATE TABLE [You Are Fired!]
( myid INT
, mychar VARCHAR(200)
);
November 24, 2015 at 7:52 am
martin.whitton (11/24/2015)
According to Chambers Dictionary, the definition of "wrong" includes:"not appropriate or suitable"
"not good or sensible; unjustifiable"
"amiss, causing trouble, pain, etc"
"not socially acceptable"
I think you could make a case for the "dotted table" being wrong on all these counts!
+1
Don Simpson
November 24, 2015 at 8:01 am
Hany Helmy (11/24/2015)
Yes valid, but definitely not recommended, I hope that MS will prevent this code from being created by mistake in future releases.
How would you propose to do that, without affecting other valid, probably not recommended either, but sometimes necessary or useful forms?
Unnecessary restriction is no substitute for due diligence in coding and review.
Viewing 15 posts - 1 through 15 (of 29 total)
You must be logged in to reply to this topic. Login to reply