Update a field to null or delete row if another field is null
I am looking for the most efficient way to update a table in the following way.
If fie开发者_Python百科ld A has a value in it and the contents of field b are being removed (null)then just update field b to null.
If field A has no value in it and field b is being updated to null then delete row.
I'm a MYSQL newbie and am aware of insert/update/delete but am wondering if there is another command that would do the above?
It sounds like you want a trigger.
精彩评论