开发者

SQL Server 2008 IntelliSense - How can I use Tab instead of Return to complete the text?

I am a software developer and most of my development tools offer IntelliSense where you use the Tab key to complete the text. Now that I'm using the IntelliSense featur开发者_如何学运维es on SMS 2008 I instinctively hit the Tab key, which fills in the text with SQL commands instead of completing the text.

For instance, if I have a table called Documents and it has a DocumentID IntelliSense offers DocumentID when I hit the letter "d". If I hit the Tab key accidentally instead of the Enter key it fills it in with DELETE. I would like to use my Tab key to complete the text if possible.

Thanks!


Not 100% sure that you can, but I use SSMS Tools and haven't looked back :o)


Here's some tips I've found for dealing with the quirks and idiosyncrasies of IntelliSense, especially for column names.

First, fill in the FROM portion of your query before the SELECT.

SELECT
    FROM MyTable

Second, always alias your tables (which IMO, is always a good practice anyhow).

SELECT 
    FROM MyTable mt

Third, when completing the SELECT list, use the table aliases. Once you type the period, IntelliSense should show you only the columns relevant to that table. At that point, the TAB key should work as you'd expect.

SELECT mt.
    FROM MyTable mt
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜