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: SQL - Count of Rows into a table

Re: SQL - Count of Rows into a table

From: david_g <david_l_gouldNOdaSPAM_at_yahoo.com.invalid>
Date: Fri, 28 Jan 2000 01:57:09 -0800
Message-ID: <000b8d9b.064a40a8@usw-ex0106-048.remarq.com>


.. or how about a PL/SQL block:

declare

    v_timestamp date :=sysdate;

    v_tab1_count Number;

    v_tab2_count Number;

    v_tab3_count Number;

begin

    select count(*)

      into v_tab1_count

       from tab1;

    select count(*)

      into v_tab2_count

       from tab2;

    select count(*)

      into v_tab3_count

       from tab3;

    Insert into tab_count

(tab1,tab2,tab3,timestamp)

    Values

(v_tab1_count, v_tab2_count, v_tab3_count, v_timestamp);

end;

/

Received on Fri Jan 28 2000 - 03:57:09 CST

Original text of this message

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