简体   繁体   中英

SQL Trigger - Check for string

Is it possible to run a trigger whenever a new row is inserted into lets say shipping_rate , and it will check column company within that row for a certain string. If that certain string is is there, I then want to perform an equation on column cost to change the current number. Is this feasible in MySQL?

Yes, it is entirely possible as trigger can do essentially anything to the database that a normal query could. You can read up on how to do that in official manual .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM