nerdexam
SnowflakeSnowflake

SOL-C01 · Question #27

SOL-C01 Question #27: Real Exam Question with Answer & Explanation

The correct answer is C: The string 'Five Thousand' cannot be implicitly converted to a NUMBER(10,2) for the 'salary'. The error is due to attempting to insert the string 'Five Thousand' into the 'salary' column, which is defined as NUMBER(10,2). Snowflake cannot implicitly convert a string representation of a number written in words to a numerical value. All other options are syntactically corre

Querying and Performance

Question

Consider the following SQL code snippet intended to insert data into a Snowflake table named 'employees'. However, the execution results in a data type mismatch error. Analyze the code and identify the root cause of the error. Assume the 'salary' column in the 'employees' table is defined as NUMBER(10,2).

Options

  • AThe 'insert' statement is missing the column names explicitly.
  • BThe date format 'YYYY-MM-DD' is incorrect for the 'hire date' column.
  • CThe string 'Five Thousand' cannot be implicitly converted to a NUMBER(10,2) for the 'salary'
  • DThe 'dept_id' is not a valid integer value.
  • EThe semi-colon (;) at the end of the VALUES clause is causing a syntax error.

Explanation

The error is due to attempting to insert the string 'Five Thousand' into the 'salary' column, which is defined as NUMBER(10,2). Snowflake cannot implicitly convert a string representation of a number written in words to a numerical value. All other options are syntactically correct or would result in different types of errors.

Topics

#Data Types#SQL INSERT#Type Coercion

Community Discussion

No community discussion yet for this question.

Full SOL-C01 PracticeBrowse All SOL-C01 Questions