Which command below will load data from result_scan to a table?
A . CREATE OR REPLACE TABLE STORE_FROM_RESULT_SCAN AS select * from table(result_scan(last_query_id()));
B . CREATE OR REPLACE TABLE STORE_FROM_RESULT_SCAN AS select * from result_scan(last_query_id());
C . INSERT INTO STORE_FROM_RESULT_SCAN select * from result_scan(last_query_id());
Answer: B
Explanation:
This command uses the CREATE OR REPLACE TABLE syntax to create a new table (or replace an existing one) with the results returned by the result_scan function. The result_scan function takes an identifier (e.g., the result of last_query_id()) and retrieves the result set of the query associated with that identifier. This is the correct way to create a new table from the results of a previous query in Snowflake.
Latest ARA-C01 Dumps Valid Version with 156 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund