There are two tables, User(int id) Message(sender_id, adresee_id) .
In the message table, two foreign keys, one of which points to the sender, and the second to the recipient of the message.
How to configure the function, procedure and trigger, so that when a user is deleted, the message table foreign key associated with the user being deleted and is set to NULL ?