SOL-C01 practice question 4 of 30
Which command can be used to query the Information Schema in Snowflake to retrieve a list of tables?
Full set: 214 questionsThe Snowflake Information Schema is a read-only schema available in every database that provides metadata about the objects within it. To retrieve a list of tables and views accessible by the current user's role, the correct command is to query the TABLES view within the INFORMATIONSCHEMA. This view contains columns like TABLENAME, TABLESCHEMA, and TABLETYPE.
A. SELECT FROM PUBLIC.INFORMATIONSCHEMA;: This syntax is invalid. INFORMATIONSCHEMA is a schema containing views and cannot be queried directly as if it were a table.
B. SELECT FROM INFORMATIONSCHEMA.COLUMNS;: This command queries the COLUMNS view, which returns metadata about individual columns within tables, not a list of the tables themselves.
D. SELECT FROM PUBLIC.TABLES;: This would query a user-created table named TABLES in the PUBLIC schema, not the system-defined metadata view for listing all tables.
- Snowflake Documentation, "Information Schema". This document introduces the Information Schema as the source for object and account metadata.
- Snowflake Documentation, "TABLES View". This page explicitly describes the INFORMATIONSCHEMA.TABLES view and its purpose: "This Information Schema view displays a row for each table or view in the specified (or current) database."
Keep practicing
Take the free SOL-C01 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other SOL-C01 practice questions
- Question 1Which Snowflake object is a logical container for schemas and other database objects?
- Question 2How can Python variable substitution be performed in Snowflake notebooks?
- Question 3Which SQL command is commonly used to load structured data from a stage into a Snowflake …
- Question 5Which command is synonymous with the LIST command in Snowflake?
- Question 6Which of the following data format supported to unload semi-structured data from Snowflak…
- Question 7Which of the following file formats can be processed by the PARSE_DOCUMENT function?
