Create volatile table in Teradata
Volatile table is a temporary table to store the results. It will live till the session ends. Volatile tables uses spool space for storage.
CREATE VOLATILE TABLE Emp_Details
EMP_ID INTEGER TITLE 'EMPLOYEE ID',
EMP_NAME VARCHAR(50) NOT NULL,
EMP_AGE SMALLINT NULL,
) WITH DATA
PRIMARY INDEX PI_INDEX(EMP_ID) ON COMMIT PRESERVE ROWS;
Note: the Primary index is optional in a volatile table. Also do not specify the database name while creating a volatile table
Read great educational content like this and a lot more !
Members get free exclusive access to content, new courses, and discounts. Signup for a free account to write a post / comment / upvote posts. Creating an account takes less than 5 seconds and you can start earning badges & points too