Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Finding out how many rows were updated?
Paul Tomlinson wrote:
> All,
>
> Why does Oracle reject the following SQL as invalid?
>
> UPDATE COMPANIES
> SET CONTACT = p_contact,
> WHERE COMPANY_ID = p_CompanyID
> RETURNING SQL%ROWCOUNT
> INTO v_noupdated;
>
> I get "PL/SQL: ORA-00911: invalid character"
> I want a way to pass back to my (C++) program the number of rows that this
> statement updated.
>
> Your thoughts?
>
>
UPDATE COMPANIES
SET CONTACT = p_contact
WHERE COMPANY_ID = p_CompanyID;
v_noupdated:= SQL%ROWCOUNT;
Or - if in a function - simply return SQL%ROWCOUNT.
-- Merry Christmas and a Happy New Year, Frank van BortelReceived on Fri Dec 19 2003 - 10:33:52 CST