if

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
if [2015/09/23 20:27]
127.0.0.1 external edit
if [2016/03/31 14:48] (current)
dmtolpeko
Line 1: Line 1:
-====== IF Statement ​- PL/HQL Reference ​======+====== IF Statement ======
  
 IF statement executes a set of statements depending on the value of a boolean expression. IF statement executes a set of statements depending on the value of a boolean expression.
  
-PL/HQL supports multiple syntaxes for IF statement. ​+HPL/HQL supports multiple syntaxes for IF statement. ​
  
 ===== IF - THEN - ELSIF/​ELSEIF - ELSE - END IF ===== ===== IF - THEN - ELSIF/​ELSEIF - ELSE - END IF =====
Line 35: Line 35:
  
 **Compatibility:​** Oracle, Teradata, IBM DB2, MySQL, PostgreSQL, Netezza. **Compatibility:​** Oracle, Teradata, IBM DB2, MySQL, PostgreSQL, Netezza.
 +
 +**Version**:​ HPL/SQL 0.1
  
 ===== IF - BEGIN - END - ELSE - BEGIN - END ===== ===== IF - BEGIN - END - ELSE - BEGIN - END =====
Line 70: Line 72:
  
 **Compatibility:​** Microsoft SQL Server. **Compatibility:​** Microsoft SQL Server.
 +
 +**Version**:​ HPL/SQL 0.1
 +
 +===== .IF THEN =====
 +
 +Syntax:
 +
 +<code language=sql>​
 +.IF boolean_expression THEN statement
 +</​code>​
 +
 +**Example:​**
 +
 +<code language=sql>​
 +.if errorcode <> 0 then .quit 1
 +</​code>​
 +
 +**Compatibility:​** Teradata BTEQ 
 +
 +**Version**:​ HPL/SQL 0.3.31