Mega Code Archive

 
Categories / MSSQL Tutorial / String Functions
 

LEFT function returns a number of characters from the left-hand side of a string

This can be  from 1 character up to all the characters in the string. 5> 6> DECLARE @LEFT_STRING char(100) 7> SET @LEFT_STRING = "www.rntsoft.com, www.rntsoft.com, rntsoft" 8> SELECT LEFT(@LEFT_STRING,10) 9> GO -------------------- www.rntsoft (1 rows affected)