Exam SnowPro Advanced Data Engineer All QuestionsBrowse all questions from this exam
Question 64

The following code is executed in a Snowflake environment with the default settings:

What will be the result of the select statement?

    Correct Answer: B

    The code sequence in Snowflake likely follows these steps: create the table 'customer', start a transaction, insert a row into the table, execute a rollback which reverts any transactional changes. However, because DDL (Data Definition Language) operations like table creation in Snowflake are auto-committed and do not exist within a transaction, the rollback will not undo the table creation. Thus, when the final SELECT $1 from the customer is executed, it will return the value 'John' from the inserted record.

Discussion
BigDataBB

is impossible to read the code : (((((

MaicasOption: C

Asumming the table is created after the transaction has begun, the DDL operation will autocommit the transaction and the Rollback won't have any effect. https://docs.snowflake.com/en/sql-reference/transactions#ddl

azure_bimonsterOption: A

I assume there is a Rollback in that scripting, if that's the case A would be correct.