declare v_cnt number; begin select count(*) into v_cnt from user_tables where table_name ='you_tab_name'; if v_cnt>0 then dbms_output.put_line('该表存在!'); else dbms_output.put_line('该表不存在或当前用户无权访问!'); end if; end;
if exists (select * from dbo.sysobjects where id=object_id(N'[dbo].[tablename]') and OBJECTPROPERTY(id,N'IsUserTable') = 1)
v_cnt number;
begin
select count(*) into v_cnt from user_tables
where table_name ='you_tab_name';
if v_cnt>0 then
dbms_output.put_line('该表存在!');
else
dbms_output.put_line('该表不存在或当前用户无权访问!');
end if;
end;