You work as a database administrator at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. Your duties at Domain.com include managing a SQL Server 2005 database named Certkiller -DB02.
Certkiller -DB02 stores the financial information of Domain.com. You notice that several values in nchar columns in the database tables contain preceding or trailing spaces. You have received instruction from the CIO to implement a mechanism that selects the data from the tables without leading and trailing spaces. It is important that your solution is available for reuse in the Transact-SQL statements and views.
What should you do?
A.
You need to create a Transact-SQL function that calls the LTRIM and RTRIM built-in functions.
B.
You need to DML create triggers that query’s the inserted and deleted tables.
C.
You need to call the TRIM built-in function.
D.
You need to create a stored procedure that calls the LTRIM and RTRIM built-in functions.
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.