Table 1: Staff PK: staff_id
Table 2: owner_has_staff: FK to the above, plus some other fields (including a FK to an entirely other database)
Is there a way to do a single insert which handles table two?
Something akin to
INSERT INTO staff (...) VALUES (...);
staff_id = CURRVAL(sequence);
INSTERT INTO owner_has_staff(...) VALUES (...);
Or do I need to break it up like that?
Table 2: owner_has_staff: FK to the above, plus some other fields (including a FK to an entirely other database)
Is there a way to do a single insert which handles table two?
Something akin to
INSERT INTO staff (...) VALUES (...);
staff_id = CURRVAL(sequence);
INSTERT INTO owner_has_staff(...) VALUES (...);
Or do I need to break it up like that?