What is SQL Server Management Studio?
SQL Server Management Studio (SSMS) is the main administration console for SQL Server.
SSMS enables you to create database objects (such as databases, tables, stored procedures, views etc), view the data within your database, configure user accounts, perform backups, replication, transfer data between databases, and more.
|Fig 3 : SSMS Console Window|
User Login :
|Fig : Server Roles|
A database is a collection of information that is organized so that it can be easily accessed, managed and updated.
Creating a database can be done by running a SQL script or by “point and click”.
Create Database :
|Fig 4 : Create DB|
Step 2 : Name your database and click OK:
Create Table :
|Fig 5 : Create Table|
2.Copy/Paste: Similar to the previous option, but this one is where you copy data from another source, then paste it into a table in your database.
3.Import: You can use the Import and Export Wizard to import data from another source.
4.SQL Scripts: You can run a SQL script that contains all data to insert.
5.Application/Website: Users update the database via an application or website.
|Fig 6: Import Wizard|
|Fig 7 : Import Wizard Client|
|Fig 8 : Finish Import|
|Fig 9 : Export Wizard|
|Fig 10 : Export Wizard Target|
|Fig 11 : Finish Export|
Server databases are the backend data storage for a front-end application. Users of the application are responsible for adding data to the database (as well as editing it).
T-SQL Scripts :
3. Drop Table :
The SQL Server DROP TABLE statement is used to remove a table definition and all data, indexes, triggers, constraints, and permission specifications for that table.
4. Insert Into :
SELECT column_name1, column_name2 FROM Table_name
1. WHERE Clause:
The MS SQL Server WHERE clause is used to specify a condition while fetching the
data from single table or joining with multiple tables.
If the given condition is satisfied, only then it returns a specific value from the table. You will have to use WHERE clause to filter the records and fetch only necessary records.
The WHERE clause is not only used in SELECT statement, but it is also used in
UPDATE, DELETE statement, etc.
- The percent sign (%)
- The underscore (_)
The MS SQL Server ORDER BY clause is used to sort the data in ascending or descending order, based on one or more columns. Some database sort query results in ascending order by default.
The SQL Server GROUP BY clause is used in collaboration with the SELECT statement to arrange identical data into groups.
The GROUP BY clause follows the WHERE clause in a SELECT statement and precedes the ORDER BY clause.
The MS SQL Server DISTINCT keyword is used in conjunction with SELECT statement to eliminate all the duplicate records and fetching only unique records.
There may be a situation when you have multiple duplicate records in a table. While fetching such records, it makes more sense to fetch only unique records instead of fetching duplicate records.
ORDER BY DateCreated DESC
- Configure security accounts
- Set up linked servers
- Create a database maintenance plan
- Create full text search catalogs
- Add remote login
- Configure replication
- Set up scheduled jobs
- and much more…