MySQL Forums
Forum List  »  Newbie

Re: Casually inserting data into employee table with referential constraints in the payroll table
Posted by: Phillip Ward
Date: October 05, 2012 07:37AM

If you want a record to be added to payroll table when you add an employee record, then you have to write the code to do it! Whether you do that in your application code or a trigger in the database is up to you, but there is no way to do it automatically.
Actually, you might want to reconsider doing both at the same time anyway. It's perfectly possible to have employees who don't currently have an active contract and, therefore, won't have any records in the payroll "system".

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
Re: Casually inserting data into employee table with referential constraints in the payroll table
October 05, 2012 07:37AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.