Can you look up a subsequent record like the below using a MySQL trigger and omitting the ID lookup SELECT statement in the original query?
INSERT INTO _skills_emp_link (skill_id, emp_id, region_id)
VALUES (‘2.’, ‘4’, (SELECT region_id FROM employees WHERE employee_id = ‘4’));
Basically I would like to issue a Query like:
INSERT INTO _skills_emp_link (skill_id, emp_id) VALUES ('2', '4')
and a BEFORE or AFTER INSERT trigger to take the emp_id 4 (entered in the initial query) and look up the attributed region_id and append the SQL query so that the FK constraints work properly.