Re: Table row count in OCI 8
From: Michael Krolewski <vandra_at_u.washington.edu>
Date: Tue, 02 Jun 1998 22:30:17 -0700
Message-ID: <3574DF69.36E8248D_at_u.washington.edu>
Date: Tue, 02 Jun 1998 22:30:17 -0700
Message-ID: <3574DF69.36E8248D_at_u.washington.edu>
Generally the same way you do anything
open database connection
... other code/cursors, etc
open a cursor
... other code that may be using the same cursor
parse the cursor 'select count(*) into :myVariable from myTable'
bind the variable
execute the SQL
... other code
close the cursor
.. other code
close the database connection
Assuming no errors, the variable (myVariable) will contain the answer
Mike K.
rakesh wrote:
> In a OCI program, what is the most efficient way to get the number of rows
> of a
> table ?
Received on Wed Jun 03 1998 - 07:30:17 CEST