Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Delete or Drop a table if it already exists - response (6) by dnoeth

$
0
0
The Select queries the system tables if the ACCT_BASE table exists select 1 from dbc.TablesV where databasename = 'C917348' and TableName = 'ACCT_BASE'; .if activitycount = 0 then GoTo ok drop table ACCT_BASE; .label ok create table ACCT_BASE(....)But this approach will not work when it's a Volatile Table, because VTs are not recorded in the data dictionary. If all those tables are Volatile the easiest way would be to logoff and logon again, this will drop all VTs. Dieter

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>