PrepAway - Latest Free Exam Questions & Answers

What should you do to this solution to be available for reuse in Transact-SQL statements and views?

You are work as a database administrator at Domain.com. All servers on the Domain.com network run Windows 2000 Server and all client computers run Windows 2000 Professional. The Domain.com network contains a SQL Server 2005 computer named Certkiller -DB02.
CERTKILLER-DB02 hosts a database named CK_Sales that stores the sales information for the company. The table structure for the CK_Sales database is shown in the following exhibit:

The Description column in the Products table is defined as an nchar column. Several values in the Description column contain preceding or trailing spaces. You want to implement a mechanism that will ignore preceding or trailing spaces when data from the Products table is retrieved. You want this solution to be available for reuse in Transact-SQL statements and views.
What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
You need to create DML triggers that query the inserted and deleted tables.

B.
You need to create a stored procedure that calls the LTRIM and RTRIM built-in functions.

C.
You need to create a Transact-SQL function that calls the LTRIM and RTRIM built-in functions.

D.
You need to call the TRIM built-in function.

Explanation:
RTRIM is a Transact-SQL command that returns a character string after truncating all trailing blanks. LTRIM is a Transact-SQL command that returns a character expression after it removes leading blanks.


Leave a Reply