Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem with SQL Server ManageMent Studio Intellisense

I have problem with autocompletion in MSSMS 2008. Every time when I try to write simple 'Id' column MSSMS replace it with 'IDENTITY' (because IDENTITY is first entry that starts on letter I).

I found that entries in autocompletion dropdown aren't sorted correctly, so I have:

entries starting on letter I:

IDENTITY  
...  
ISNULL  
...  
ICQNumber  
..  
Id  

Is there any way to change this wrong behaviour to correct one? I mean - force MSSMS 2008 to sort it correctly?

like image 246
Marek Kwiendacz Avatar asked May 05 '11 14:05

Marek Kwiendacz


People also ask

Why is IntelliSense not working in SSMS?

IntelliSense is not available when the Query Editor is connected to earlier versions of the Database Engine. IntelliSense is turned off in the Database Engine Query Editor when the SQLCMD mode is set on.

How do I get IntelliSense to work through SSMS?

How to Enable IntelliSense Feature in SSMS. Open SSMS, click Tools -> Options -> Expand Text Editor -> Expand Transact-SQL and click on IntelliSense as shown in the snippet below. Under Transact-SQL IntelliSense Settings ensure “Enable IntelliSense” checkbox is enabled.

How do I clear my SSMS cache?

How do I clear my SSMS cache? To clear SQL Server's cache, run DBCC DROPCLEANBUFFERS , which clears all data from the cache. Then run DBCC FREEPROCCACHE , which clears the stored procedure cache.


2 Answers

It seems that Intellisense has some case sensitivity going on.

Typing either id or ID causes it to prompt IDENTITY but typing Id causes it to prompt Id.

It's still a pain, but I find that remembering to type Id saves a lot of use of the backspace key.

like image 71
Andy Avatar answered Oct 30 '22 10:10

Andy


The best solution I've found (and it's a good practice anyhow) is to start column references with the table name (or alias):

SELECT YourTable.id
    FROM YourTable

OR

SELECT yt.id
    FROM YourTable yt
like image 44
Joe Stefanelli Avatar answered Oct 30 '22 09:10

Joe Stefanelli