Replacing table

Database
Enthusiast

Replacing table

Hello,

In SAS if a new table A is created using the table A itself, the new table will overwrite the old. Can you pl let me know if same is the case in TD. -

create volatile table emp as

( select a.*

from emp a

left outer join company b

on a.id = b.id

)

with data and stats

on commit preserve rows

;

Will my newly created emp table replace the old one ?

Thanks

Tags (1)
2 REPLIES
Enthusiast

Re: Replacing table

If emp exists your query will fail.

To replace , drop old first.

Rlgass

Junior Supporter

Re: Replacing table

SAS work tables and Teradata Volatile tables are similar in a way that both exists only for Session.  SAS allows to replace tables if they already exist, Teradata does not. You need to do what Rglass suggests that is to drop if table already exist.