MySQL Forums
Forum List  »  Spanish

Re: Sumatoria sql
Posted by: Jesús Uzcanga
Date: March 24, 2018 10:58AM

Debes crear un trigger que llame a un stored procedure

El stored procedure puede hacer el insert automaticamente cada ves que detecte una insercion en la tabla de compras.

PD: De cua;quier forma te recomendaria no hacerlo de esa forma, yo no crearia esa tabla sumatoria si no que calcularia diirectamente con un SELECT desde la tabla de compra

Ing. Jesús Alfredo Uzcanga
Twitter: @JesusUzcanga

We learn the 20% of what we HEAR,
the 50% of what we SEE,
the 80% of what we DO and
the 95% of what we TEACH.


Options: ReplyQuote

Written By
Re: Sumatoria sql
March 24, 2018 10:58AM

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.