🎯 Few days left this month Support SQLTest.online and help us keep SQL practice free for everyone. Donate today →
SQL code copied to buffer
Task

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.

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