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: Find Empty Tables

Re: Find Empty Tables

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Fri, 30 May 2003 12:01:04 +0000
Message-ID: <bb7a85$k72$1@ctb-nnrp2.saix.net>


Andy wrote:

> You could try SELECT 'X' FROM DUAL WHERE EXISTS( SELECT 'X' FROM table).

I would suggest the following:
DECLARE
  i number(6);
BEGIN
  SELECT
    /*+ FIRST_ROWS */
    count(*) INTO i_
  FROM table
  WHERE rownum = 1;

  bluh
END; Cchecking if i_ is 0 (FALSE) or 1 (TRUE) for rows in the specified table.

The hint should guarantee a sub second response on even VLTs.

--
Billy
Received on Fri May 30 2003 - 07:01:04 CDT

Original text of this message

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