WHERE Surname = @SearchName COLLATE Cyrillic_General_CI_AS

You have a table named Person that contains a nvarchar column named Surname. The Person table currently has a clustered index on PersonID. The Surname column contains Russian and Japanese characters. The following code segment will be used to search by Surname.
IF @lang =’Russian’
SELECT PersonID, Surname
FROM Person
WHERE Surname = @SearchName COLLATE Cyrillic_General_CI_AS
IF @lang = ‘Japanese’
SELECT PersonID, Surname
FROM Person
WHERE Surname = @SearchName COLLATE Japanese_CI_AS_KS
You need to enable SQL Server to perform an index seek for these queries.
What should you do?
A. Create a computed column for each collation that needs to be searched. Create an index on each computed column.
B. Create a new column for each collation that needs to be searched and copy the data from the Surname column. Create an index on each new column.
C. Create a computed column for each collation that needs to be searched. Create an index on the Surname column.
D. Create an index on the Surname column.

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.