开发者

SQL Server 2008 autocomplete for "TOP" keyword

开发者 https://www.devze.com 2022-12-08 18:50 出处:网络
Either the autocomplete in SQL Server Management Studio 2008 is buggy, or I am.Either way, when I try to type this and hit the spacebar:

Either the autocomplete in SQL Server Management Studio 2008 is buggy, or I am. Either way, when I try to type this and hit the spacebar:

SELECT TOP开发者_Python百科 

Autocomplete immediately changes it to this (Topics is a table in one of our databases, btw):

SELECT Topics

Is there a way to fix, or at least gracefully work around this?


Unfortunately, no. SSMS Intellisense is a 1.0 product, and is not as feature-rich as many third-party products. You can turn it off OR ignore the suggestion (with the ESC key).


I think all you can do is hit ESC when the intellisense pop-up appears which will cancel any change it makes, or just turn Intellisense off completely by going to Text Editor -> Transact-SQL -> Intellisense.


I know this has been answered already but if you are looking for a tool that is quite useful/helpful try SQL Prompt from Red Gate. I have used this tool for years and found it is a great replacement for the built-in intellisense with plenty of options to allow for the tool help you be more efficient...


Also, you can cheesily add one column empty tables for the most common keywords you have issues with. Then it autocompletes to the table name but context puts it into the right usage.

Going one further you can:

CREATE table [top ] (c bit) 

with the space at the end so the auto-complete is perfect.

After you create the object you'll want to hit CTRL-SHFT-R to refresh your Intellisense.

0

精彩评论

暂无评论...
验证码 换一张
取 消