← Back to ALTER & DROP
Question 24
Drop Tables Safely
Drop Tables Safely
Remove theenrollmentstable from this database, and also remove aclubstable that exists on some copies of the database but not on this one. Write twoDROP TABLEstatements that run without an error whether or not each table is present, so useIF EXISTSon both. Afterwards neitherenrollmentsnorclubsmay exist.
Expected result:
Table enrollments ✓ enrollments is dropped Table clubs ✓ clubs is dropped
Hints3 available
Sign in to use hintsTopics:
ALTER & DROP
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (sel, ins, desc)
Results
Run your SQL to see every statement's output here, then how it compares with the expected answer.
Not sure what is in a table? SHOW TABLES lists them and DESCRIBE students shows the columns — or open the database browser on the left.