Keep SQLtest alive: Help cover this month's $100 server costs to keep all lessons and the SQL playground online. Support the project →
SQL code copied to buffer
Task 37:

Modify Staff Table

MySQL
After the department table has been created in this task, change the staff table by add new column department_id at and of table.
The department_id column must be integer field with foreign key to column department_id of department table.
For all records in the staff table set value in department_id column relevant the Sales department
Expected result Columns: 2 · Rows: 2
staff_id department_id

Write your query below and click "Check it!". Tables are described in the right pane.

The query result will appear here. Ctrl+Enter - Run query