Create Empty Table Copy in Amazon Athena

Answer Correct answer: B — Use CREATE TABLE AS SELECT ... WHERE FALSE to create an empty table structure without copying data.

A data engineer needs to create an empty copy of an existing table in Amazon Athena to perform data processing tasks. The existing table in Athena contains 1,000 rows. Which query will meet this requirement?

  1. CREATE TABLE new_table -
  2. CREATE TABLE new_table - Correct Answer
  3. CREATE TABLE new_table -
  4. CREATE TABLE new_table -

Community Votes

B
100%

100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

To create an empty table structure without copying data, use 'CREATE TABLE new_table AS SELECT * FROM old_table WHERE FALSE'.

This question tests the correct SQL syntax for creating an empty copy of an existing table in Amazon Athena using a CREATE TABLE AS SELECT (CTAS) statement with a false condition.

Learners often choose options that include a WHERE clause filtering specific data or omitting the WHERE clause entirely, which results in copying all rows instead of an empty structure.

Community Discussion (4 comments)

pikuantne 👍 2 Selected: B
Definitely B
truongnguyen86 👍 3 Selected: B
should be B with no data option to create empty table from CTAS
2022MMTT 👍 2
B https://docs.aws.amazon.com/athena/latest/ug/ctas-examples.html#ctas-example-empty-table
Parandhaman_Margan 👍 1
Answer: B

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

The requirement is to create an empty copy of an existing table's schema. The correct approach is to use a CTAS (Create Table As Select) statement combined with a condition that always evaluates to false, such as WHERE FALSE or WHERE 1=0. This ensures the table structure is created based on the source table, but no rows are inserted because the query returns zero results.

Why the Other Options Are Wrong

Options that copy data (e.g., without a restrictive WHERE clause) would populate the new table with the 1,000 rows, violating the "empty" requirement. Options that do not use CTAS might fail to replicate the schema correctly or require separate DDL steps. Any option missing the SELECT * or using a non-false condition will result in data duplication.

Community Comment Notes

The community consensus strongly supports answer B. Users noted that the key to this question is identifying the query that creates the table structure without ingesting data. One user referenced AWS documentation confirming that CTAS with a false predicate is the standard method for this task.

Official Reference

Exam Strategy

When asked to create a table schema without data in Athena, look for a CTAS statement paired with a WHERE FALSE or WHERE 1=0 clause. This is a common pattern for partitioning strategies or pre-creating tables for future loads.

Frequently Asked Questions

Why not just CREATE TABLE like normal SQL?

In Athena, you typically need to define the schema explicitly if not using CTAS. Using CTAS with a false condition is a concise way to replicate the exact schema of an existing table instantly.

Does WHERE 1=0 work the same as WHERE FALSE?

Yes, both evaluate to false for every row, resulting in zero rows being selected. Both are valid methods to create an empty table copy via CTAS.

More DEA-C01 FAQ →

Related Analysis

Practice All DEA-C01 Questions

Access 100 questions with complete answers and detailed explanations.

View Full DEA-C01 Practice Test →

← Back to DEA-C01 Study Guide