Table: Dept
Dept_ID Dept_Name
{7CFBF07C-0123} Engineering
{864CB2DF-519E} Planning
{344FDBBF-5FDD} Accounting
Table: Employee
Emp_ID FN LN Dept_ID
5562 John Smith ------
I have the above two tables. John Smith is from the Engineering Dept. I tried to insert his info in the Employee but I couldn’t because of the Dept_ID integrity. How can I write an Insert statement to automatically get the Dept_ID from the Dept Table and insert in the Employee table along for the Emp_ID, FN, LN which are known?
Check this if you can't read the tables.
Dept_ID Dept_Name
{7CFBF07C-0123} Engineering
{864CB2DF-519E} Planning
{344FDBBF-5FDD} Accounting
Table: Employee
Emp_ID FN LN Dept_ID
5562 John Smith ------
I have the above two tables. John Smith is from the Engineering Dept. I tried to insert his info in the Employee but I couldn’t because of the Dept_ID integrity. How can I write an Insert statement to automatically get the Dept_ID from the Dept Table and insert in the Employee table along for the Emp_ID, FN, LN which are known?
Check this if you can't read the tables.