
Ultimate access to all questions.
Which of the following commands will return the location of database customer360?
A
DESCRIBE LOCATION customer360;
B
DROP DATABASE customer360;
C
DESCRIBE DATABASE customer360;
D
ALTER DATABASE customer360 SET DBPROPERTIES ('location' = '/user');
E
USE DATABASE customer360;
Explanation:
To retrieve the location of a database named "customer360" in a database management system like Hive or Databricks, you can use the DESCRIBE DATABASE command followed by the database name. This command will provide information about the database, including its location.
Detailed Explanation:
DESCRIBE DATABASE customer360; - This is the correct command that returns metadata about the database including its location, owner, comment, and properties.
DESCRIBE LOCATION customer360; - This is not a valid SQL command in Databricks/Hive.
DROP DATABASE customer360; - This command would delete the database, not return its location.
ALTER DATABASE customer360 SET DBPROPERTIES ('location' = '/user'); - This command changes database properties but doesn't return the current location.
USE DATABASE customer360; - This command switches to the database context but doesn't display its location.
In Databricks, when you run DESCRIBE DATABASE customer360;, it returns information including: