天天看點

RIGHT (T-SQL)

Returns the part of a character string starting a specified number of integer_expression characters from the right.

RIGHT<b>(</b>character_expression<b>,</b> integer_expression<b>)</b>

<dl></dl>

<dt></dt>

character_expression

<dd>Is an expression of character data. character_expression can be a constant, variable, or column of either character or binary data.</dd>

integer_expression

<dd>Is the starting position, expressed as a positive whole number. If integer_expression is negative, an error is returned. </dd>

<b>varchar</b>

character_expression must be of a data type that is implicitly convertible to <b>varchar</b>. Otherwise, use CAST to explicitly convert character_expression.