Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Create a table only if the table doesn't exists
"Mark D Powell" <Mark.Powell_at_eds.com> a écrit dans le message de news:
1151005831.800279.287370_at_y41g2000cwy.googlegroups.com...
> In your pl/sql routine you can select againt all_tables or dba_tables
> to see if the table exists. A select count(*) always returns a value
> so zero would indicate the table does not exist and to run the create
> table logic while > 0 would tell that the table already exists.
Following your advice, I have written it like this (I prefer to look into user_tables to avoid to see others schemas tables):
DECLARE
tableExists number;
BEGIN
![]() |
![]() |