Teradata Data ManipulationThe SQL commands used to manipulate the data stored in the Teradata tables. Insert RecordsINSERT INTO statement is used to insert records into the table. Syntax Following is the generic syntax for INSERT INTO, such as: Example Consider the following student table in which we try to insert records into the table. Once the above query is inserted, we can use the SELECT statement to view the records from the table.
Insert from another TableINSERT SELECT statement is used to insert records from another table. Syntax Following is the generic syntax for INSERT INTO. Example In the following example we insert records into the student table. Create a table called Student_Bkup with the same column definition as student table before running the following insert query. When the above query is executed, it will insert all records from the student table into the student_bkup table. Rules Here are some specific rules to insert records from another table, such as:
Update RecordsThe UPDATE statement is used to update records from the table. Syntax Following is the generic syntax for UPDATE. Example In the following example we update the student BirthDate to 5/6/1997 for student 10001. The following output shows that the BirthDate is updated from 5/6/1990 to 5/6/1997 for RollNo 10001. Rules Here are some specific rules to update the records from the table, such as:
Delete RecordsDELETE FROM statement is used to update records from the table. Syntax Following is the generic syntax for DELETE FROM. Example In the following example we delete the student 10001 from the table student. In the following output, we can see that student 10001 is deleted from the table. Rules Here are some specific rules to delete records from the tables, such as:
Next TopicTeradata Select Statement
|