Update

Alexander
30 de Septiembre del 2005
Hola,
Me gustaría saber como puedo realizar un UPDATE tomando como referencia más de una tabla.
Gracias.....

Rodolfo Reyes
30 de Septiembre del 2005
Esto lo saque de la ayuda que trae el cliente 9i.

SET (column_name, column_name, ...) = (subquery4)
This clause assigns the values retrieved from the database by subquery4 to the columns in the column_name list. The subquery must return exactly one row that includes all the columns listed.

The column values returned by the subquery are assigned to the columns in the column list in order. The first value is assigned to the first column in the list, the second value is assigned to the second column in the list, and so on.

In the following correlated query, the column item_id is assigned the value stored in item_num, and the column price is assigned the value stored in item_price:

UPDATE inventory inv -- alias
SET (item_id, price) =
(SELECT item_num, item_price FROM item_table
WHERE item_name = inv.item_name);


jotaab
30 de Septiembre del 2005
SI FUNCIONA Y GRACIAS RODOLFO, LO ANDABA BUSCANDO Y A LA PRIMERA LO ENCONTRE