nerdexam
Snowflake

SOL-C01 · Question #19

You have a permanent table 'ORDERS' in your Snowflake database. You want to create a temporary table 'TEMP ORDERS' that will automatically be dropped at the end of your session. You also want to ensur

The correct answer is E. CREATE TEMPORARY TABLE TEMP ORDERS AS SELECT FROM ORDERS;. CREATE TEMPORARY TABLE is the correct Snowflake syntax for a session-scoped table - it auto-drops when the session ends and has no Time Travel or Fail-safe, meaning the data is unrecoverable, which satisfies both requirements in the question. Why the others are wrong: A (CREATE T

Snowflake Overview and Architecture

Question

You have a permanent table 'ORDERS' in your Snowflake database. You want to create a temporary table 'TEMP ORDERS' that will automatically be dropped at the end of your session. You also want to ensure this table's data is not recoverable after the session ends. Which of the following SQL statements should you use?

Options

  • ACREATE TABLE TEMP ORDERS AS SELECT FROM ORDERS;
  • BCREATE TEMP TABLE TEMP ORDERS AS SELECT FROM ORDERS;
  • CCREATE TRANSIENT TABLE TEMP ORDERS AS SELECT FROM ORDERS;
  • DCREATE VOLATILE TABLE TEMP ORDERS AS SELECT FROM ORDERS;
  • ECREATE TEMPORARY TABLE TEMP ORDERS AS SELECT FROM ORDERS;

How the community answered

(49 responses)
  • B
    10% (5)
  • C
    4% (2)
  • D
    2% (1)
  • E
    84% (41)

Explanation

CREATE TEMPORARY TABLE is the correct Snowflake syntax for a session-scoped table - it auto-drops when the session ends and has no Time Travel or Fail-safe, meaning the data is unrecoverable, which satisfies both requirements in the question.

Why the others are wrong:

  • A (CREATE TABLE) creates a permanent table with full Time Travel and Fail-safe - it will not drop at session end.
  • B (CREATE TEMP TABLE) - while TEMP is a recognized alias in some SQL dialects, Snowflake's documented standard keyword is TEMPORARY; this option is a distractor testing whether you know the canonical syntax.
  • C (CREATE TRANSIENT TABLE) creates a table that persists across sessions (it's not session-scoped), and while it lacks Fail-safe, it must be dropped manually.
  • D (CREATE VOLATILE TABLE) is not valid Snowflake syntax - VOLATILE is a Teradata keyword, making this a cross-platform distractor.

Memory tip: Think of the three Snowflake table types by lifespan - Permanent (forever, full recovery), Transient (forever, no Fail-safe), Temporary (session only, no recovery). The word "temporary" literally means "lasting only for a time" - match the word to the behavior.

Topics

#Temporary Tables#Table Types#Session Scope#Data Recovery

Community Discussion

No community discussion yet for this question.

Full SOL-C01 Practice