Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check if table exist

Status
Not open for further replies.

jass1220

Programmer
May 20, 2003
88
AE
in oracle 6i i want to write a code that checks if the table is existed or not

for example i want to say

if table history exist then

delete * from history
update from history ......... whatever

else if not exist then

create table history as select * from whatever

end if
 
you should be able to

select * from tab where table_name = 'history';

Then check your return codes for a hit/miss and code the
delete or create accordingly.

There are other tables in the catalog but tab should work.
 
"update from history" is invalid sql statement. You'll also need to use FORMS_DDL built-in to create table from Forms trigger.

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top