QuestionQ90

VerifiedRetrieving data using the SQL SELECT statement

Which two of the following queries execute successfully?

Choose two
Explanation

NULLIF cannot use a literal NULL as its first expression; when its arguments are not both numeric, they must have the same data type. NULLIF(100, 100) is valid and returns NULL. COALESCE(100, NULL, 200) is valid and returns the first non-null value, 100. A numeric expression combined with the character literal ‘A’ is not type-compatible for these expressions.

Learn more

Community Discussion

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