Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle : IF Exists

Re: Oracle : IF Exists

From: Alex Filonov <afilonov_at_pro-ns.net>
Date: Tue, 17 Oct 2000 19:50:45 GMT
Message-ID: <8siaih$702$1@nnrp1.deja.com>

You can do it simpler:

select count(1)
from all_tables
where table_name = 'YOUR_TABLE'
  and owner = 'OWNER_NAME';

In article <EdZG5.109$L32.45184_at_wdc-read-01.qwest.net>,   "Mike Dwyer" <dwyermj_at_co,larimer.co.us> wrote:
> if exists (select 1 from all_tables where table_name = 'YOUR_TABLE')
> (if "you" are not the owner of the table, you would also need to
 include
> "and owner = 'OWNER_NAME'")
>
> <holth_at_my-deja.com> wrote in message

 news:8sguce$10f$1_at_nnrp1.deja.com...
> > Hi
> > I Need some way to confirm if a table exists or not.
> > In MS SQL i used the function IF EXISTS. What is the equivalent to
 this
> > in Oracle??
> > Thanks for any help
> > Lars
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Oct 17 2000 - 14:50:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US