Collection Contents Index IF statement INCLUDE statement [ESQL] pdf/chap9.pdf

Reference Manual
   CHAPTER 9. SQL Statements     

IF statement [T-SQL]


Function 

To provide conditional execution of a SQL statement, as an alternative to the Watcom-SQL IF statement.

Syntax 

IF expression
... statement
... [ ELSE
... [ IF expression ]
... statement ]

Authorization 

None.

Side effects 

None.

Description 

The Transact-SQL IF conditional and the ELSE conditional each control the performance of only a single SQL statement or compound statement (between the keywords BEGIN and END).

In comparison to the Watcom-SQL IF statement, there is no THEN in the Transact-SQL IF statement. The Transact-SQL version also has no ELSEIF or END IF keywords.

Standards and compatibility 

Example 


Collection Contents Index IF statement INCLUDE statement [ESQL] pdf/chap9.pdf