You are working in a Teradata database application. You have to CREATE a table and insert some records for performance analysis. You have to DROP the table once you have done with your job. If this is the case, will you think a smart way for this?
Yeah. Teradata gives VOLATILE option with CREATE TABLE syntax.
CREATE VOLATILE TABLE TABLE_NAME
(
COLUMN_1 DATATYPE,
COLUMN_2 DATATYPE
) PRIMARY INDEX (COLUMN_1)
ON COMMIT [PRESERVE/DELETE] ROWS;
More about VOLATILE:
- You can have 1000 volatile tables in an active session.
- CHECK and REFERENTIAL constraints are not allowed.
- DEFAULT clause not allowed.
Here VOLATILE says, DO and GO.. i will take care...