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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Question on the IF clause

Re: Question on the IF clause

From: paul cluiss <paul_cluiss_at_intervoice.com>
Date: Tue, 12 Oct 1999 19:16:44 -0500
Message-ID: <48D0928B868205BF.7186A3B141A1C2D3.B80CF7E0024E11AC@lp.airnews.net>


Don't you need to say *which* columns you're wanting to select? Something like "select * from ..."

Brandon Duncan wrote:

> To anyone who knows the answer:
> Why does the following SQL Block fail on line 8? Are there only certain
> statements which can fall within an IF clause? If, so, what are they?
>
> 1 DECLARE
> 2 llTableExists NUMBER(11,0);
>
> 3 BEGIN
> 4 SELECT INTO llTableExists TABLE_NAME FROM ALL_TABLES WHERE
> TABLE_NAME = 'Table1' AND 5 OWNER = 'OWNER1';
> 6
> 7 IF llTableExists >=1 THEN
> 8 DROP TABLE Table1;
> 9 END IF;
> 10 END;
>
> Thanks,
>
> Brandon
Received on Tue Oct 12 1999 - 19:16:44 CDT

Original text of this message

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