Error while creating Volatile Table

General

Error while creating Volatile Table

Hi, I am using teradata Ver 14.01 and want to create a Volatile Table and for that I am using the below syntax:

create volatile table my_temp
(st_name varchar(30),
St_id integer
)
On Commit Preserve Rows;

and tried to fetch the data from existing table

create volatile table my_temp
AS
(Select * from mytable)
With Data
On Commit Preserve Rows;

but everytime I am getting error :199: SQL0199N The use of the reserved word "TABLE" following "" is not valid. Expected tokens may include: "TABLESPACE". SQLSTATE=42601.

Please let me know where I am going wrong.
1 REPLY
Teradata Employee

Re: Error while creating Volatile Table

You may be using Teradata SQL Assistant 14.01 as the client tool, but the database you are connected to is a DB2 instance. It does not recognize Teradata-specific SQL.