
Explanation:
The correct answer is CREATE OR REPLACE TEMPORARY VIEW view_name AS SELECT * FROM table_name. This command creates a session-scoped temporary view, which is automatically dropped once the session ends or if the notebook is detached. This is the default behavior for temporary views in Databricks.
Ultimate access to all questions.
Which SQL command correctly creates a session-scoped temporary view?
A
CREATE OR REPLACE LOCAL VIEW view_name AS SELECT * FROM table_name
B
CREATE OR REPLACE TEMPORARY VIEW view_name AS SELECT * FROM table_name
C
CREATE OR REPLACE VIEW view_name AS SELECT * FROM table_name
D
CREATE OR REPLACE GLOBAL TEMPORARY VIEW view_name AS SELECT * FROM table_name
E
CREATE OR REPLACE LOCAL TEMPORARY VIEW view_name AS SELECT * FROM table_name
No comments yet.