Question: The FOREIGN KEY Constraint
Learn how to apply the FOREIGN KEY constraint in a table.
Question
Given the following Employees
and Skills
tables structures:
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 |
...
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.