Home » Developer & Programmer » Forms » how to judge a table exist or not?
how to judge a table exist or not? [message #81860] Thu, 27 March 2003 05:46 Go to next message
zhangrui
Messages: 37
Registered: March 2003
Member
hey
how to judge a table exist or not?
Re: how to judge a table exist or not? [message #81862 is a reply to message #81860] Thu, 27 March 2003 09:54 Go to previous messageGo to next message
magnetic
Messages: 324
Registered: January 2003
Senior Member
declare
v_exist varchar2(1);
begin

select 'x'
into v_exist
from mytable
where rownum=1;
message('table exist');
exception
when no_data_found then
message(table exist but has no data');
when others
message('table doesnt exist');
end;
Re: how to judge a table exist or not? [message #81866 is a reply to message #81860] Thu, 27 March 2003 12:28 Go to previous message
Julie
Messages: 98
Registered: February 2002
Member
select count(*)
into v_count
from user_tables
where table_name = 'MY_TABLE_IN_ALL_CAPS';

if count > 0 then;
message('MY_TABLE exists');
else ...
Previous Topic: Anybody know how to make a link to a DB2 database
Next Topic: Re: how to develop a Available query forms
Goto Forum:
  


Current Time: Wed Apr 24 11:59:17 CDT 2024