T-SQL 101: #3 Types of T-SQL Statements

In earlier posts of this introductory series for learning T-SQL, I talked about what SQL is, then about what T-SQL is. There are three basic types of T-SQL statements: DML, DDL, and DCL.

The first of these are called DML. That's data manipulation language. These are the main language statements that you'll use and are about getting data into and out of tables. They include reading data by using SELECT, and modifying it by INSERT, UPDATE, DELETE, and MERGE.

The second type of statement is a DDL statement. That's data definition language. These are used to define how data is stored. For example, you might need to create a new table to hold data. They include words like CREATE, ALTER, and DROP.

The third type of statement is a DCL statement. That's data control language. These statements are used to say who is able to access the data in the first place. They include words like GRANT, DENY, and REVOKE.

The vast majority of the commands we'll look at in this series are DML, because we want to either read data that's already in tables, or we want to put the data there.

Learning T-SQL

It's worth your while becoming proficient in SQL. If you'd like to learn a lot about T-SQL in a hurry, our Writing T-SQL Queries for SQL Server course is online, on-demand, and low cost.

Leave a Reply

Your email address will not be published. Required fields are marked *