T-SQL Statements

Transact SQL is a Microsoft standard SQL. Transact SQL is used to perform operations only in SQL Server. It is a procedural language.
T-SQL = SQL + Programming Constructs.

There are four types of T-SQL Commands.

  1. DDL (Data Definition Language)
  2. DML (Data Manipulation Language)
  3. DCL (Data Control Language)
  4. TCL (Transaction Control Language)

 

DDL – Data Definition Language:
DDL commands are used to define the structure of the table in the databse. The following are the DDL commands:

  • Create
  • Alter
  • Drop
  • Truncate

 

DML – Data Manipulation Language:
DML commands are used to manipulate the data in the database. The following are the DML commands:

  • Insert
  • Update
  • Delete
  • Select.

DCL – Data Control Language:
DCL commands are used to control the data in the database. The following are the DCL commands:

  • Grant
  • Deny
  • Revoke

 

TCL – Transaction Control Language:
TCL commands are used to control the transactional activities in the database. The following are the TCL commands:

  • Commit
  • Rollback
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: