English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

In a Oracle procedure, I have an update statement like:

UPDATE employee
SET salary = 1000
WHERE dept_no = 10;

I want it to set a variable (that I can use later) or pop up a message telling me how many records were actually updated in that statement.

How can I do that?

2007-07-11 10:35:43 · 2 answers · asked by lyderslim 3 in Computers & Internet Programming & Design

I am using Oracle Forms. This is part of a PL/SQL package in Forms.

2007-07-11 10:56:43 · update #1

2 answers

Set your variable to SQL%ROWCOUNT or pop up your message displaying the SQL%ROWCOUNT.

2007-07-12 03:17:46 · answer #1 · answered by Charlie Mack 2 · 0 0

Depends on what you're using to execute the SQL. In Java JDBC, for example, any update statement returns the number of rows impacted.

2007-07-11 10:52:45 · answer #2 · answered by McFate 7 · 0 0

fedest.com, questions and answers