Search

SSMS : IntelliSense confuses CREATE / ALTER TABLE options by aaronbertrand

Closed

3
0
Sign in
to vote
Type: Bug
ID: 772800
Opened: 11/29/2012 1:09:14 PM
Access Restriction: Public
0
Workaround(s)
1
User(s) can reproduce this bug
If I create the following table:

CREATE TABLE dbo.foo(ID INT, CONSTRAINT foo_ID PRIMARY KEY(ID));
GO

Then in Object Explorer, expand my table > indexes and right-click the constraint, choosing script as > drop and create, I get this script:

ALTER TABLE [dbo].[foo] DROP CONSTRAINT [foo_ID]
GO

ALTER TABLE [dbo].[foo] ADD CONSTRAINT [foo_ID] PRIMARY KEY CLUSTERED
(
    [ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

This script runs fine. But in Management Studio, if IntelliSense is enabled, I get red squigglies under SORT_IN_TEMPDB = OFF and ONLINE = OFF - both tooltips tell me these are not valid **CREATE** TABLE options.

While the tooltip in isolation is correct, it's out of place in this context - this isn't a CREATE TABLE statement.
Details (expand)

Product Language

English

Version

SQL Server 2012 - Developer Edition

Category

Tools (SSMS, Agent, Profiler, Migration, etc.)

Operating System

Not Applicable

Operating System Language

US English

Steps to Reproduce

Paste this script into Management Studio:

CREATE TABLE dbo.foo(ID INT, CONSTRAINT foo_ID PRIMARY KEY(ID));
GO
ALTER TABLE [dbo].[foo] DROP CONSTRAINT [foo_ID];
GO
ALTER TABLE [dbo].[foo] ADD CONSTRAINT [foo_ID] PRIMARY KEY CLUSTERED
(
    [ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY];
GO

Actual Results

SORT_IN_TEMPDB = OFF and ONLINE = OFF are underlined and identified as invalid CREATE TABLE options.

Expected Results

Neither option should be underlined in this case.

Platform

X64

Virtualization

 
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 4/8/2013 at 2:01 PM
Hello Aaron. Thanks for the feedback. We triaged this issue and at this time do not plan to address it. We will be moving it to archive to keep in mind for a future release. -Walter A Jokiel, Program Manager, SQL Server (wajokiel@microsoft.com)
Posted by Microsoft on 2/22/2013 at 11:07 AM
Hello Aaron. Thank you for bringing this to our attention. We really do appreciate the feedback. We’ll investigate and get back to you. -Walter A Jokiel, Program Manager, SQL Server (wajokiel@microsoft.com)
Sign in to post a workaround.