Free Databricks Certified Data Analyst Associate Actual Exam Questions - Question 8 Discussion
remove the table from the database and all of the data files associated with the table. The rest of the
tables in the database must continue to exist.
Which of the following commands can the analyst use to complete the task without producing an
error?
Option B, DROP TABLE is the standard way to remove just one table and its data files.
B/C? B seems legit for dropping the table and files. C looks off because DELETE TABLE isn’t a usual command, but maybe it’s a trick? Still, B is safer.
B imo, since DROP TABLE with the full database and table name is the proper SQL way to just remove that one table and its data without affecting others. The rest either delete too much or use wrong syntax.
It’s B, since DROP TABLE with the database and table name is the standard way to remove just that table
D imo, because DELETE TABLE isn't valid SQL syntax, and options involving DROP DATABASE would remove everything. B is the only one that correctly drops just the specified table and its data files.
Maybe B is right because DROP TABLE removes the table and its data without touching the rest of the database. The others either delete the whole database or use incorrect syntax.
B/E? B looks standard, but E’s syntax seems off with the "FROM" keyword. Dropping the table should take care of data files too, so B is the safer pick here.
Actually, options C, D, and E aren’t valid SQL commands for dropping tables, so they’re out. Option B is the straightforward DROP TABLE syntax that removes both the table and data without affecting others.
B for sure, the rest either target whole DB or have wrong syntax.
Option B is definitely the way to go since it specifically removes the table and its data without touching other tables in the database. The other options either drop the whole database (A) or use invalid syntax (C, D, E). DROP TABLE with the full qualifier is the standard command for this task.
The answer is B. DROP TABLE database_name.table_name; It drops the specific table and its data files without affecting the rest of the database.