PrepAway - Latest Free Exam Questions & Answers

You are maintaining a SQL Server database that uses the default settings. The database contains a table that i

You are maintaining a SQL Server database that uses the default settings. The database contains a table that is defined by the following Transact-SQL statement:



You must write a query that returns the AddressLine1, AddressLine2, and Region fields separated by carriage returns. You must return an empty string for any null values.

PrepAway - Latest Free Exam Questions & Answers

A.


B.


C.


D.


A. Option A

B. Option B

C. Option C

D. Option D

Explanation:

Char(13) is a carriage return.

Use the IIF construct to return an empty string for NULL values of the Adressline2 column.

IIF returns one of two values, depending on whether theBoolean expression evaluates to true or false in SQL Server.

References: https://msdn.microsoft.com/en-us/library/hh213574.aspx


Leave a Reply