
Answer-first summary for fast verification
Answer: INSERT INTO TBL_EMPLOYEE(EMP_ID, EMP_NAME, EMP_SALARY, DEPT) VALUES(1, 'Adam', 20000, 'Finance’);
The question asks which SQL statement requires a virtual warehouse to run. In Snowflake, virtual warehouses provide compute resources for operations that process data. Option C (INSERT statement) is a DML operation that modifies table data and requires compute resources from a virtual warehouse to execute. Option A (SELECT COUNT(*)) retrieves metadata from the cloud services layer and does not require a virtual warehouse. Option B (ALTER TABLE ADD COLUMN) is a DDL operation that modifies table structure and is handled by the cloud services layer without needing a warehouse. Option D (CREATE OR REPLACE TABLE) is also a DDL operation that doesn't require a warehouse. The community discussion confirms this, with 92% selecting C and explanations noting that DML operations like INSERT require warehouse resources while metadata operations and DDL do not.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Which SQL command will utilize a virtual warehouse for execution?
A
SELECT COUNT(*) FROM TBL_EMPLOYEE;
B
ALTER TABLE TBL_EMPLOYEE ADD COLUMN EMP_REGION VARCHAR(20);
C
INSERT INTO TBL_EMPLOYEE(EMP_ID, EMP_NAME, EMP_SALARY, DEPT) VALUES(1, 'Adam', 20000, 'Finance’);
D
CREATE OR REPLACE TABLE TBL_EMPLOYEE ( EMP_ID NUMBER, EMP_NAME VARCHAR(30), EMP_SALARY NUMBER, DEPT VARCHAR(20) );
No comments yet.