IF-THEN-END IF - Advanced SQL Engine - Teradata Database

SQL Stored Procedures and Embedded SQL

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
vqj1592443206677.ditamap
dita:ditavalPath
vqj1592443206677.ditaval
dita:id
B035-1148
lifecycle
previous
Product Category
Teradata Vantageā„¢

This form of IF executes the statements within the IF and END IF bounds when conditional_expression evaluates to TRUE.

The following statement is an example of IF-THEN-END IF:

   IF hNoAccts = 1 THEN
     INSERT INTO temp_table VALUES (hNoAccts, 'One Customer');
   END IF;