Add a foreign key after table creation

SQL Medium 4 views
Back to Questions

Problem Description

Departments exists. Employees exists without FK. Add FK on Employees.dept_id referencing Departments.dept_id.

Input Format

SQL DDL

Output Format

DDL statement(s)

Sample Test Case

Input:
Employees, Departments
Output:
FK added

Constraints

None

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next