I have a table of users
Users id, first_name, last_name 1, Tom, Baar
and also I have 10 tables where all of them have a column which is the
Contracts id, name, contract_manager(foreign key of users table) 1, Servers, 1 Logs id, data, user_id(foreign key of users table) 1, data, 1
My question is how can I check if the user_id who I want to delete exists in one of the 10 tables it is associated so that I prevent the deleteion of the user ?