Re: calcular el total de una columna al insertar
Hola Fausto!
Quizás puedas resolverlo con un "Trigger"
Insert:
CREATE TRIGGER before_cust_order_insert
BEFORE INSERT ON cust_order
FOR EACH ROW
SET new.total = new.cant * new.precio
Update:
CREATE TRIGGER before_cust_order_update
BEFORE UPDATE ON cust_order
FOR EACH ROW
SET new.total = new.cant * new.precio
Subject
Views
Written By
Posted
1118
December 15, 2019 07:49PM
Re: calcular el total de una columna al insertar
627
December 16, 2019 04:04AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.