Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellisense for JOINs in SQL Server Management Studio

In SQL Server Management Studio (SSMS) is there an option to enable intellisense auto-completion for JOINs?

For example, if I type:

SELECT * FROM Employee INNER JOIN _

at this point I would like intellisense to give me the tables related to Employee, and when I pick one to fill in the appropriate join condition, based on the foreign key relationships.

LinqPad does this for LINQ queries, which is great. I would like the same in SSMS. I am using SqlServer 2012.

like image 955
Edward Avatar asked Sep 30 '12 11:09

Edward


People also ask

How do I get IntelliSense in SQL Server Management Studio?

On the Tools menu, click Options. Expand Text Editor, expand Transact-SQL, and then click IntelliSense. Clear the check boxes for the IntelliSense options that you do not want. To change the script size at which IntelliSense features are disabled, select a size from the Maximum script size list.

What does IntelliSense do in SSMS?

The editors in SQL Server Management Studio support Microsoft IntelliSense options that reduce typing, provide quick access to syntax information, or make it easier to view the delimiters of complex expressions.

How do I enable suggestions in SQL Server Management Studio?

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.

Why is my IntelliSense not working SSMS?

The first step of troubleshooting IntelliSense is to check and make sure IntelliSense is enabled in the settings. Launch SSMS and go to menu Tools >> Options. In the Options window, expand TextEditor >> Transact-SQL >> IntelliSense. Make sure Enable IntelliSense is selected.


2 Answers

Microsoft still have a long way to go for their implementation of intellisense to catch up to Red-Gate SQLPrompt. Even in SQL 2012 it is at a bare minimum.

Red-Gate SQL Prompt has merged with Red-Gate SQL Refactor which means that in addition to intellisense you get a number of features to help with code layout/format, find unused variables, summarise your scripts etc.

When you factor in the ability to attach snippets of code to acronyms then for me its a killer app.

If you have the money to buy SQLPrompt I would certainly recommend it.

like image 91
Dave Poole Avatar answered Oct 12 '22 07:10

Dave Poole


I use devart's SQL Complete. As of this writing, it is half the price of Red Gate's SQL Prompt and has a similar feature-set. They have demo of their auto JOIN completion here: http://www.devart.com/dbforge/sql/sqlcomplete/images/join-clause-auto-generation.gif .

They offer a free version that is slightly better than SSMS 2008's Intellisense, but it does not include the auto JOIN suggestions of their paid versions.

Unfortunately, I have yet to run across a free tool offering what you seek.

like image 31
coge.soft Avatar answered Oct 12 '22 08:10

coge.soft