
Answer-first summary for fast verification
Answer: Using the LOCATION keyword with CREATE TABLE marks the table as unmanaged, while with CREATE DATABASE, it specifies where the database's tables will be stored.
The LOCATION keyword serves different purposes depending on whether it's used with CREATE DATABASE or CREATE TABLE. For CREATE DATABASE, it specifies the path where the database's data objects will be stored. For CREATE TABLE, it marks the table as unmanaged or external, meaning dropping the table won't delete the underlying data. More info: [Using LOCATION with CREATE TABLE](link) | [Using LOCATION with CREATE DATABASE](link).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
What is the difference between using the LOCATION keyword when creating a database versus a table?
A
Using the LOCATION keyword with CREATE TABLE marks the table as unmanaged, while with CREATE DATABASE, it specifies where the database's tables will be stored.
B
The LOCATION keyword cannot be used with CREATE DATABASE but can be used with CREATE TABLE.
C
Using the LOCATION keyword has no effect whether it's used with CREATE TABLE or CREATE DATABASE.
D
Using the LOCATION keyword with either CREATE TABLE or CREATE DATABASE marks them as unmanaged or external.
E
Using the LOCATION keyword with CREATE DATABASE marks it as unmanaged, while with CREATE TABLE, it marks the table as managed.