SSMS
Before we begin our journey with T-SQL (MS SQL Server programming language) we need to be familiar with SQL Server Management Studio, also known as SSMS, an application software developed by Microsoft, to manage, configure and administer Microsoft SQL Server and all its components like Database Engine, Analysis services, Integration Services, Reporting Services etc. SQL Server Management Studio provides a centralized management platform for all kind of SQL related work. We can create a database, add tables, create relationships, constraints, functions, procedures, views, triggers etc. We can also define authorization on objects like who is authorized on which object and for what.
Lets start exploring SQL Server Management Studio. Open SSMS by navigating it in all program list as below:
Go to Start Button -> All Programs -> Open SQL Server Management Studio to start SSMS instance. We need an authorized account to connect to SSMS instance.
Connect to SSMS
Select Database Engine (if not selected by default) in Server type and connect to SSMS with appropriate authentication mode (SQL Server Authentication orWindows Authentication). You need to provide your credentials (a user name with password) in case you are using SQL Server Authentication mode. But in case your windows account is authorized to connect with SQL Server, you can proceed with Windows Authentication which does not need a user name and password.
Once you get connected to SSMS successfully, you will get a screen with Object Explorer and Object Explorer Details. If you are not able to view these tabs, pressF8 (Object Explorer) and F7 (Object Explorer Details) to get these options available. Alternatively, you can also click on view menu and then choose;
View -> Object Explorer
View Object Explorer Details
Have a look on below image in which I have highlighted few important folders with high level details. Try to get familiar with these folders as much as you can but no need to worry as we would play with all these folders throughout our tutorial.
SQL Server Management Studio – SSMS
Click on “New Query” on top to open a new query window. A new query window will appear where we can write out T-SQL statements. To execute the T-SQL code, click on “Execute” button or press “F5” function key.
SQL Server Management Studio – Execute query
Before we begin our journey with T-SQL (MS SQL Server programming language) we need to be familiar with SQL Server Management Studio, also known as SSMS, an application software developed by Microsoft, to manage, configure and administer Microsoft SQL Server and all its components like Database Engine, Analysis services, Integration Services, Reporting Services etc. SQL Server Management Studio provides a centralized management platform for all kind of SQL related work. We can create a database, add tables, create relationships, constraints, functions, procedures, views, triggers etc. We can also define authorization on objects like who is authorized on which object and for what.
Lets start exploring SQL Server Management Studio. Open SSMS by navigating it in all program list as below:
Go to Start Button -> All Programs -> Open SQL Server Management Studio to start SSMS instance. We need an authorized account to connect to SSMS instance.
Connect to SSMS
Select Database Engine (if not selected by default) in Server type and connect to SSMS with appropriate authentication mode (SQL Server Authentication orWindows Authentication). You need to provide your credentials (a user name with password) in case you are using SQL Server Authentication mode. But in case your windows account is authorized to connect with SQL Server, you can proceed with Windows Authentication which does not need a user name and password.
Once you get connected to SSMS successfully, you will get a screen with Object Explorer and Object Explorer Details. If you are not able to view these tabs, pressF8 (Object Explorer) and F7 (Object Explorer Details) to get these options available. Alternatively, you can also click on view menu and then choose;
View -> Object Explorer
View Object Explorer Details
Have a look on below image in which I have highlighted few important folders with high level details. Try to get familiar with these folders as much as you can but no need to worry as we would play with all these folders throughout our tutorial.
SQL Server Management Studio – SSMS
Click on “New Query” on top to open a new query window. A new query window will appear where we can write out T-SQL statements. To execute the T-SQL code, click on “Execute” button or press “F5” function key.
SQL Server Management Studio – Execute query