Code to demonstrate the use of LEFT function in SQL Server

Rajnilari2015
Posted by Rajnilari2015 under Sql Server category on | Points: 40 | Views : 2244
DECLARE @string VARCHAR(20) = 'Hello how r u?'
SELECT LEFT(@string,10)

/*
Hello how
*/

By using the LEFT function we have chopped off the first 10 characters of the string.

Comments or Responses

Login to post response