Programming Constructs
The languages that interface to database management systems are sometimes divided into three categories:
DML, Data Manipulation Language—This includes the ability to read and manipulate the data. Examples are SELECT, INSERT, DELETE, and UPDATE.
DDL, Data Definition Language—Creating and altering the storage structures; an example is CREATE TABLE.
DCL, Data Control Language—Defining permissions for data access; examples are GRANT, REVOKE, and DENY.
T-SQL includes other statements that can be useful, for instance, in tying together the DML statements in a stored procedure, such as IF, ELSE, and WHILE.
The IF Statement
The IF statement takes one argument: boolean_expression, which is an expression that can evaluate to TRUE
Get Microsoft® SQL Server™ 2000 Unleashed, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.