Which expression should you use to define the column?

You administer a Microsoft SQL Server database that contains a table named Products.
In a bit column named Discontinued, a value of 1 indicates a product is inactive, and a value of 0 indicates the product is active.
You need to create a view that returns a column with a full product status description.
Which expression should you use to define the column?
A. IF(Discontinued = 0, ‘Active’, ‘Inactive’)
B. CASE Discontinued
WHEN 0 THEN ‘Active’
WHEN 1 THEN ‘Inactive’
END
C. IF Discontinued = 0
‘Active’
ELSE
‘Inactive’
D. DECODE (Discontinued, 0, ‘Active’, 1, ‘Inactive’, ‘Unknown’)

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.