Fueling PL/SQL (Update RETURNING)

Dúvidas, dicas e truques de PL/SQL. Aqui também vão assuntos relacionados a pacotes, triggers, funções, Java-Stored Procedures, etc

Poston Wed, 23 Feb 2005 2:41 pm

Applications need information about the rows affected by an SQL statement, for example, to generate a report. The Insert, Delete, and Update statements may include the RETURNING clause, which returns the column values from the affected row by row in PL/SQL.
This eliminates the need to select the row after the DML.

aí you ask me ... but what difference does that make?

Some basic things that if they are forgotten is crucial to the speed of access to data, such as:-bandwidth consumption, and network traffic, because you would be changing and selecting data, 2 connections to the Bank instead of a single-CPU occupancy time-smallest number of open cursors on BD-the amount of memory required is much smaller.

Putz ... but how do I implement this?
Code: Select all
PROCEDURE update_salario (emp_id NUMBER) IS
nome VARCHAR2(15);
novo_sal NUMBER;


   UPDATE emp SET sal = sal * 1.1
   WHERE empno = emp_id
RETURNING ename, sal INTO nome, novo_sal;

-- agora é só meter ferro em nome e novo_sal


that aí ... now her cock!!

in a few days coloo mis some aí tips!!! as far as possible and of course knowledge [] 's
Location: Videira - SC

Poston Wed, 23 Feb 2005 3:08 pm

Way to go!
Here's a post that speaks more about RETURNING viewtopic.php?t=268&highlight=returning fallow
Location: Portland, OR USA

Thomas F. G

Você já respondeu a dúvida de alguém hoje?

  • See also
    Last Post

Return to PL/SQL

Who is online

Users browsing this forum: No registered users and 12 guests