What will be the output of

DECLARE @Name VARCHAR(30) = 'FirstName MiddleName LastName'
SELECT
CONCAT(
PARSENAME(REPLACE(@Name,' ','.'),3),',',
PARSENAME(REPLACE(@Name,' ','.'),2),',',
PARSENAME(REPLACE(@Name,' ','.'),1)
)

 Posted by Rajnilari2015 on 10/28/2015 | Category: Sql Server Interview questions | Views: 1563 | Points: 40
Select from following answers:
  1. FirstName,MiddleName,LastName
  2. MiddleName,LastName,FirstName
  3. FirstName,LastName,MiddleName
  4. FirstName,MiddleName,LastName,
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response