Are You Using SSMS effectively ?

Template Explorer

Let us say you want write a DDL trigger but you do not remember
the correct syntax for creating a DDL Trigger (which is different than a
regular trigger).

You can use the Template Explorer to assist you in this. The
Template Explorer launched by selecting View > Template Explorer. This
provides a very comprehensive listing of T-SQL templates for common tasks.

If you double click the template you want , relevant
template will be opened.

By clicking Shift+Ctrl+M, you will get the option of
entering template parameters, so that those can be entered in once place.

You can create your own template with parameters using the
following format.

<database_name, sysname,

In the above example, database_name is the parameter name,
sysname is the data type and the adventureworks is the default value.

Short Cuts

There are a few task that you will most likely perform daily
such as viewing table structures or viewing indexes. You can create customized
short cuts for these tasks. Select Tools > Options > Keyboard and you
will be taken to following window.

By way of example, when analyzing your table structure,
indexes you could do this by going to the object explorer and expanding the
table. However, this is time consuming since to obtain the table structure,
index information you need to navigate several pages. Instead simply hit ALT +
F1 and you will see all the relevant information for that particular table. Note
that for this short cut might have an issue, if you are using not default
schema (ex:dbo), for these cases  you need your objects to be enclosed with
quotes. ( ‘ HumanResources].[Employee]’).

Pages: 1 2


No comments yet... Be the first to leave a reply!