[英]MySQL: how to set the triggers
我的問題是在這種情況下:
我想設置一個觸發器,以便每次在為相同的location_ID和product_ID插入product_Amount時,都可以在現有行中進行更新,而無需創建新行。
location_ID
product_ID
product_Amount
您可以在location_ID, product_ID上設置UNIQUE約束location_ID, product_ID並在觸發器中使用INSERT INTO ... ON DUPLICATE KEY UPDATE ...
location_ID, product_ID
UNIQUE
INSERT INTO ... ON DUPLICATE KEY UPDATE ...
[英]how to set triggers with the dynamic values in mysql?
[英]How to set up mysql multi-triggers
[英]How to use triggers in Mysql
[英]How to disable triggers in MySQL?
[英]How to convert Oracle triggers to mysql
[英]How to implement 2 or more triggers on mysql
[英]How to use alias in mysql triggers?
[英]How to fire triggers on the Views in MySql
[英]How to declare If Statement in mysql triggers
[英]how to declare variable phpmyadmin mysql triggers properly?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.