### Multi-Statement Teradata SQL Request Example 1 Source: https://docs.teradata.com/r/6PnNbyXUb7~2s0An1dgTrw/root Demonstrates a multi-statement Teradata SQL request where an INSERT statement is followed by a SELECT statement. The first semicolon acts as a statement separator, and the second as a request terminator. ```sql INSERT INTO TestDB.TA (Name) VALUES (’NameA’) ; SELECT * FROM TestDB.TA; ``` -------------------------------- ### Single-Statement Teradata SQL Request Source: https://docs.teradata.com/r/6PnNbyXUb7~2s0An1dgTrw/root A basic example of a single Teradata SQL statement used to select all data from a table. This is a fundamental query for retrieving information. ```sql SELECT * FROM Personnel.Employee; ``` -------------------------------- ### Log on to Teradata Vantage using BTEQ Source: https://docs.teradata.com/r/Configuring-Teradata-VantageTM-After-Installation/January-2021 Use this command in BTEQ to log on to the Vantage system. Replace 'systemname.your_company.com' with your system's FQDN. ```sql .logon systemname.your_company.com/dbc; ``` -------------------------------- ### Set BTEQ display options Source: https://docs.teradata.com/r/Configuring-Teradata-VantageTM-After-Installation/January-2021 Run these commands in BTEQ before executing SQL requests to ensure all columns in results are visible and lines are folded. ```coffeescript .sidetitles on .foldline on ALL ``` -------------------------------- ### Create Basic Policy Table Source: https://docs.teradata.com/r/ANSI-Temporal-Table-Support/June-2020 Defines a standard SQL table for policy information without temporal support. ```sql CREATE TABLE Policy( Policy_ID INTEGER, Customer_ID INTEGER, Policy_Type CHAR(2), Policy_Details CHAR(40) ) UNIQUE PRIMARY INDEX(Policy_ID); ``` -------------------------------- ### Create Policy Table with Date Columns Source: https://docs.teradata.com/r/ANSI-Temporal-Table-Support/June-2020 Extends the Policy table definition to include Start_Date and End_Date columns to manually track validity periods. ```sql CREATE TABLE Policy( Policy_ID INTEGER, Customer_ID INTEGER, Policy_Type CHAR(2), Policy_Details CHAR(40) Start_Date DATE, End_Date DATE ) UNIQUE PRIMARY INDEX(Policy_ID); ```