Question: The FOREIGN KEY Constraint
Explore how to define a foreign key constraint in SQL to connect employee skills with employee records. This lesson helps you understand maintaining relational data integrity by ensuring the Skills table references correct employee IDs in the Employees table.
We'll cover the following...
We'll cover the following...
Question
Given the following Employees and Skills ...
Employees
EmpID | EmpName | Salary |
1 | Susan Lee | 50000.00 |
2 | Alexa Smith | 60000.00 |
3 | Dana Amberson | 45000.00 |
4 | Sarah Ronald | 47000.00 |
Skills
SkillID | EmpID | SkillName |
1 | 1 | C++ |
2 | 4 | Java |
3 | 1 | Python |
4 | 3 | Blender |
...