November 3, 2016 at 12:16 am
Comments posted to this topic are about the item CREATE TABLE and Indexes
November 3, 2016 at 1:02 am
This was removed by the editor as SPAM
November 3, 2016 at 4:34 am
Thanks Steve!
I strongly feel that Qotd's like these, is the best way to learn changes made to the product over various versions.
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
November 3, 2016 at 6:11 am
Thanks Steve for this question. I learned something new about the inline indexes. I found a good description in MSDN here:
https://msdn.microsoft.com/en-us/library/bb510411(v=sql.120).aspx
November 3, 2016 at 6:54 am
Guessed wrong. I need to upgrade to 2016.
November 3, 2016 at 7:22 am
Oh, I missed the part about this being SQL Server 2016. When I run this on our 2008 R2 instance, I get:
Msg 1018, Level 15, State 1, Line 5
Incorrect syntax near 'INDEX'. If this is intended as a part of a table hint, A WITH keyword and parenthesis are now required. See SQL Server Books Online for proper syntax.
Oh well.
Be still, and know that I am God - Psalm 46:10
November 3, 2016 at 8:04 am
The question now is, did they update the script generator to reflect this new capability? Probably not. I also think it's interesting that they'd spend time on such a thing but not spend time on actual "Create or Replace" syntax. Yeah, they did something else that helps but what's the "standard"?
Did they, by any chance, also make it so that you can alter a synonym? No.
MS seems to make "improvements" based on what will sell the best but then they don't pay any attention to details when they do. We have a new splitter that won't return the ordinal position of the split out elements and returns nothing if you pass it a null. We still don't have a high performance sequence generator (built in Tally Function).
Stuff like this really makes me ask "what were they thinking"?
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2016 at 8:32 am
Missed the 2016 part and compared to 12
Oh well, learnt something new
- Damian
November 3, 2016 at 10:34 am
Interesting, very interesting. Thanks, Steve!
November 3, 2016 at 11:31 am
Nifty, too bad I don't create tables often enough to care much about this vs just declaring the indexes separately. Especially if SSMS wasn't also updated to script out indexes inline.
November 3, 2016 at 4:36 pm
Iwas Bornready (11/3/2016)
Guessed wrong. I need to upgrade to 2016.
Version SQL Server 2014 would be enough. Inline specification of indexes
was introduced in version SQL Server 2014, see my link above.
November 4, 2016 at 7:27 am
Agreed!
November 7, 2016 at 5:15 am
Jeff Moden (11/3/2016)
Stuff like this really makes me ask "what were they thinking"?
My guess is that they were thinking about marketing, advertising and long lists of new functionality. After all, the "reasons to change to SQL Server X" appears to be greater when it's a HUGE list of features. Now, the individual features being incomplete is something they won't address - after all, they're brand new features. 😉
November 7, 2016 at 7:45 pm
Jeff Moden (11/3/2016)
... I also think it's interesting that they'd spend time on such a thing but not spend time on actual "Create or Replace" syntax.
Create or Replace would be a beautiful thing.
November 8, 2016 at 5:58 am
Marcia J (11/7/2016)
Jeff Moden (11/3/2016)
... I also think it's interesting that they'd spend time on such a thing but not spend time on actual "Create or Replace" syntax.Create or Replace would be a beautiful thing.
Yes, it would. I really missed it from my Oracle days, but have gotten used to not having it. I'd like to see other things before they spend time on that, but I doubt they'd spend time on them.
Viewing 15 posts - 1 through 15 (of 18 total)
You must be logged in to reply to this topic. Login to reply