I have 3 tables employees, managers, users. I want to insert value 1 into users column is_manager only if the id from employees matches id from managers. id is primary key in employees and primary and foreign key in managers.
Any help would be appreciated. Thanks
Either
or
will do. I recommend the latter for better readability.