Postgresql trigger function that checks if data that's been updated in a single column is equal to something

by Torrino McQueen   Last Updated August 01, 2020 11:26 AM - source

I have a single table A with 3 columns id, name, price. I'm trying to create a trigger in postgres that fires when the value under price is updated/set to 0. If the value is 0, then the entire row is deleted.

I'm a complete beginner in postgresql but I desperately need this for my node.js project. Any help is greatly appreciated!



Related Questions