QuestionQ41

VerifiedUsing Conversion Functions and Conditional Expressions

Refer to the Exhibit and review the data in the products table.

Question Image

You must display product names from the products table that are in the 'software/other' category, have minimum prices of either S2000 or S4000, and have no unit of measure. You issue this query:

Question Image

Which statement is true about the preceding query?

Explanation

Oracle treats a zero-length character string as NULL. Comparing PROD_UNIT_OF_MEASURE with <> '' is therefore a comparison with NULL, which cannot evaluate to TRUE; the statement executes successfully but returns no rows. Testing for a missing unit of measure requires PROD_UNIT_OF_MEASURE IS NULL.

Community Discussion

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