functions commonly used to intercept strings in SQL Server:1. Left(character_expression, integer_expression) function Description: Left('Source String','to intercept the leftmost number of characters') returns the specified number of characters from the left of the stringSelect Left('sql_server_2008',4); return Result: Sql_2. Right(character_expression, integer_expression) function Description: Right('Source String','to intercept the rightmost number of characters'returns the integer_expression character of the specified number from the right in the stringSelect Right('sql_server_2008',4); Returns the result: -3.SUBSTRING(character_expression, start, length) function Description:SUBSTRING('Source String','intercept start position (with characters at that location)','Intercept Length') returns the character,binary、textOrImagepart of an expressionSelect SUBSTRING('sql_server_2008',5,6); return Result: Server
Common functions for intercepting strings in SQL Server