SQL SERVER TUTORIAL IN DEPTH

The blog is to help users about sql server

Others

LightBlog

Breaking

Tuesday, 12 November 2013

Use of Space and ' '


SELECT RTRIM(First_Name) +' '+ LTRIM(Last_Name)
FROM tbl_User_Master
where userid='51403607'

o/p
--ANURAG NAYAK


SELECT RTRIM(First_Name) +SPACE(1) + LTRIM(Last_Name)
FROM tbl_User_Master
where userid='51403607'

o/p
--ANURAG NAYAK

No comments:

Post a Comment

 test