Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL: How to check if a table exists or not?
hello
In article <34047555.2D31BB02_at_icepr.com>, "Michael A. Casillas" <casillas_at_icepr.com> writes:
> Yet another one:
>
> How can I check in PL/SQL if a table exists or not. Is there a built in
> function that can return TRUE or FALSE? I know the table name, I just
> want to know if it's there or if I have to create it. Thanks in
> advance.
select count(*) into x from user_tables where table_name =
the_name_you_are_looking_for;
if x=0 then
>
> Michael Casillas
>
HTH
peter
Received on Fri Aug 29 1997 - 00:00:00 CDT
![]() |
![]() |