QuestionQ7

Transform Data

A database contains a table and a stored procedure defined as follows:

Question Image

The log_table is initially empty, and a Data Engineer runs this command:

CALL insert_log(NULL::VARCHAR);  

No other operations affect the log_table. What is the outcome of this procedure call?

Explanation

RETURNS NULL ON NULL INPUT causes Snowflake to skip execution of the stored procedure when any input argument is NULL and return NULL instead. Therefore, the INSERT statement does not run, leaving the initially empty table with zero records.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!