SOL-C01 · Question #82
Which of the following statements are true regarding the 'SELECT ' command in Snowflake?
The correct answer is A. It selects all columns from a specified table or view. E. It can be used in conjunction with a 'WHERE' clause to filter the results.. SELECT retrieves every column from a single specified table or view (A), and it absolutely works with WHERE to filter rows (E) - these are foundational SQL behaviors that hold true in Snowflake just as in any SQL database. Why the distractors are wrong: B is false: Snowflake does
Question
Which of the following statements are true regarding the 'SELECT ' command in Snowflake?
Options
- AIt selects all columns from a specified table or view.
- BIt always returns the columns in the order they were defined in the table schema.
- CIt is generally recommended for production environments due to its performance efficiency.
- DIt selects all columns from all tables in the current database.
- EIt can be used in conjunction with a 'WHERE' clause to filter the results.
How the community answered
(35 responses)- A94% (33)
- B3% (1)
- C3% (1)
Explanation
SELECT * retrieves every column from a single specified table or view (A), and it absolutely works with WHERE to filter rows (E) - these are foundational SQL behaviors that hold true in Snowflake just as in any SQL database.
Why the distractors are wrong:
- B is false: Snowflake does not guarantee column order matches the schema definition - result column order can vary, especially with views or certain query optimizations.
- C is the opposite of best practice:
SELECT *is discouraged in production because it fetches unnecessary columns, wastes compute and credits (Snowflake bills by compute usage), and breaks queries silently when the schema changes. - D is simply wrong:
SELECT *scopes to the single table or view named inFROM, never the entire database.
Memory tip: Think of the * as a wildcard for columns within one table, not a sweeping database-wide grab - and remember that in Snowflake's credit-based model, "grabbing everything" costs money, so production code should always name columns explicitly.
Topics
Community Discussion
No community discussion yet for this question.