Example: Insert With Named Columns - Advanced SQL Engine - Teradata Database

SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
qtb1554762060450.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantage™

To add a row to the employee table for new employee Orebo, you could submit the following statement:

     INSERT INTO employee (name, empno, deptno, dob, sex, edlev)
     VALUES ('Orebo B', 10005, 300, 'Nov 17 1957', 'M', 18) ;

In this example, you list the columns that are to receive the data, followed by the data to be inserted, in the same order as the columns are listed.

If you do not specify a value for a named column, the system inserts a null.