Complete the code to delete a row from the parent table.
DELETE FROM parent_table WHERE id = [1];We use the actual id value (10) without quotes because id is numeric.
Complete the code to preview rows in the child table that will be deleted due to CASCADE.
SELECT * FROM child_table WHERE parent_id = [1];We use the numeric value 10 to match the parent_id column.
Fix the error in the CASCADE delete preview query.
SELECT * FROM child_table WHERE parent_id = [1];The semicolon is needed to end the SQL statement properly.
Fill both blanks to preview and then delete rows with CASCADE.
SELECT * FROM child_table WHERE parent_id = [1]; DELETE FROM parent_table WHERE id = [2];
Use the numeric value 10 for both preview and delete to match the parent row.
Fill all three blanks to preview child rows, delete parent row, and confirm deletion.
SELECT * FROM child_table WHERE parent_id = [1]; DELETE FROM parent_table WHERE id = [2]; SELECT * FROM child_table WHERE parent_id = [3];
Use the numeric id 10 consistently to preview, delete, and confirm child rows.
