T-SQL Intellisense and SQL Code Snippets Manager in Microsoft SQL Server 2012, Denali
SQL Server Code Snippets tool is one of the enhancements in Microsoft SQL Server 2012, Denali.
Code Snippets is especially a valuable SQL Server tool for t-sql developers and SQL Server database administrators.
Code Snippets enables rapid coding in sql and makes t-sql programming easier with its well-structured usage.
As a t-sql developer working since SQL Server 7.0 I had the chance to observe the sql intellisense improvements studies in Microsoft SQL Server.
And I can easily say that T-SQL intellisense has never been so much easier with any third-party sql intellisense tool in Microsoft SQL Server.
Perhaps you have already used SQL Prompt SQL Server Intellisense tool or SQL Format SQL Server Intellisense tool.
With new intellisense features of Microsoft SQL Server 2011 and with new SQL Code Snippets Manager tool, you will no more require these third-party tools.
Code Snippets Manager comes with build-in t-sql scripts which are enough for common topics like create table, create procedure, create trigger, etc.
SQL developers or database administrators can also upload their scripts into SQL Server 2011 Code Snippets Manager.
Let's take a closer look at SQL Code Snippets Manager, one of Microsoft SQL Server 2011 features especially useful for sql developers and database administrators.
Start SQL Server Manager Studio which is powered by Microsoft Visual Studio 2010.
Open a query editor screen. Then select Tools from top menu. Then click on Code Snippets Manager item.
The Tools > Code Snippets Manager menu selection will display the following sql Code Snippets Manager screen.
This manager screen enables sql developers, script coders and database admins to add new script templates or import script templates.
Using Code Snippets Manager efficiently will prevent you from the necessity of memorizing t-sql syntax of SQL commands.
And as a tsql developer I will use Code Snippets feature as a starting point while creating t-sql statements.
If you are on the Query Editor screen of new SQL Server 2011 Sql Server Managemet Studio (SSMS), while the cursor is on the query editor screen right click on an empty place.
Then from the displayed context menu select Insert Snippet... menu item as seen from the below SQL Server Denali screenshot.
Then a list of groups of stored sql code snippets will be displayed.
For example if we want sql codes to Create Trigger in SQL Server 2011, Denali choose Trigger sql code snippet from the list.
As you see in the below sample screenshot, there is a Create Trigger code snippet template. T-SQL developers can choose this code snippet.
Here is the inserted Create Trigger syntax from SQL Server 2011 Code Snippet Manager.
You see using code snippet manager will prevent you from the necessity to memorize all t-sql syntax for common sql commands.
After I download and install Microsoft SQL Server 2011 on my Windows 7 PC, I first checked the Tools menu of SQL Server Management Studio to see what is new in SQL Server 2011.
I love this SQL Server 2011 feature. And I believe Transact-SQL IntelliSense in SQL Server 2011 is one of the major improvements and SQL Server 2011 features.