How to get the statement that was used to create a table in Teradata?

Database
N/A

How to get the statement that was used to create a table in Teradata?

 
4 REPLIES
Senior Apprentice

Re: How to get the statement that was used to create a table in Teradata?

SHOW TABLE mytable;

Enthusiast

Re: How to get the statement that was used to create a table in Teradata?

SELECT REQUESTTEXT FROM DBC.TABLES
WHERE TABLENAME LIKE '%MYTABLE%';
Khurram
Senior Apprentice

Re: How to get the statement that was used to create a table in Teradata?

Hi Khurram,

this might return "create index" or "alter table" if the table definition was modified after creation.

Re: How to get the statement that was used to create a table in Teradata?

if the table definition was modified after creation create index