Intellisense, SQL Formatting, Code Refactoring in SSMS - SQL Complete Tutorial
SQL Complete is a useful add-in for SSMS and VS with powerful autocompletion and SQL code beautifier features by Devart. https://www.devart.com/dbforge/sql/sqlcomplete/
View all features of SQL Complete: https://www.devart.com/dbforge/sql/sqlcomplete/features.html
Watch the latest overview video about SQL Complete: https://www.youtube.com/watch?v=0kaPoEINMSM&list=PLpO6-HKL9JxXSZgO3L0MxOTt3QxpFbJNt&index=46
#SQL #SSMS #VisualStudio #SQLComplete #dbForge
Closed Caption:
Welcome to the SQL Complete tutorial.
In this tutorial, we will overview the main features
of the product and show examples of their
usage.
Let's move on to typing.
As soon as you type "USE", SQL Complete
automatically starts suggesting available
databases.
First, use a simple SQL snippet for the quote
template "ssf" and then type "prod".
You can sneak peek a table structure in the
Quick Object Hint window.
Select the Product table.
Note, that the alias for the selected table
was generated automatically.
If you move the mouse pointer over it,
you will see the quick object information.
You can configure the alias generation settings
in the Options dialog box.
Let's expand the wildcard and select the
columns you want to see in the result set.
A quick information is available for every
database object.
Now, let's revert the expand columns operation,
and select the required columns from the list
with help of the space key.
If you type "JOIN", you will get all join
suggestions for the table, that are based on the
foreign key reference.
Select join with the ProductSubcategory table.
As you can see, a complete join clause is
promoted.
Column picker for a quick list building includes
columns of all tables that are involved in the
statement.
Add a column from the ProductSubcategory
table to the select list.
Now, execute the query.
Let's substitute Nulls with zeros in the result.
For this, apply the "coalesce" function in the
title column.
Now, adjust the parameter info appearance
right after typing the opening bracket.
Set alias.
Let's execute the query once again by pressing
F5.
As you see, there are no Nulls in the result.
Now, let's format the document to beatify our
query.
To set up your own formatting style,
Select SQL Complete, Options, Formatting.
Then select Profiles, Edit Profiles and see a
wide range of customizable formatting options.
Now let's take a look at the "Go To Definition"
feature.
You can quickly navigate to the table in the
Object Explorer tree by selecting "Go To
Definition" from the SQL Complete menu or
by pressing F12.
Now let's consider the usage of SQL Snippets.
To create a table you can simply type "cre" and
you'll see all create statement templates.
Now type "CT" and the required template is right
at hand.
You can select the Create Table template even
quicker by typing the uppercase or lowercase
letters "CT".
You can see a snippet in the edit mode.
To switch between the parameters, use the Tab
key, and use return to commit snippet.
Change its name to "DemoTable".
Now let's add several columns -
the Name column,
the Description column,
(as you see the column types are also
prompted)
and the Modified Date column.
Now, let's insert some data into the created
table.
Let's use the predefined snippet "Insert Into".
Press the Tab key to expand the INSERT
statement to the full template
Exclude the ModifiedDate column from the
INSERT statement.
Now let's enter the values.
and execute the script.
Now we will take a look at the Document Outline
feature.
You can see a document structure and navigate
through it.
If you want to know what tables are created and
modified in the script, or would like to modify a
statement,
Type "table" or the object name in the filter field,
and quickly jump to the code by double-clicking
the object.
You have been watching the dbForge SQL
Complete Tutorial.
Download the 30-day free trial of SQL Complete
at devart.com
Thank you for watching.
Video Length: 03:41
Uploaded By: Devart
Published: 6/17/2015
View Count: 27,004