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: Counting rows returned from a query

Re: Counting rows returned from a query

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 28 Sep 1998 18:52:27 GMT
Message-ID: <3617da76.23398975@192.86.155.100>


A copy of this was sent to danalynn_at_my-dejanews.com (if that email address didn't require changing) On Mon, 28 Sep 1998 18:03:21 GMT, you wrote:

>Hello,
>
>I am trying to find out how many rows were affected by a SQL query (Update or
>Insert). I know that MSSQL has a background variable @@rowcount that returns
>exactly this, but what does Oracle have?
>
>(I'd rather not do this in PL/SQL with the sql%rowcount value, I was hoping to
>find something in basic SQL)
>

what language are you using?

In pro*c for example, it would look like:

{

    EXEC SQL UPDATE FOO SET x = x+1;
    printf( "rows affected = %d\n", sqlca.sqlerrd[2] );

    EXEC SQL COMMIT WORK;
}

so the sqlca has it.

>Thank you.
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon Sep 28 1998 - 13:52:27 CDT

Original text of this message

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