|
reverse()
The
string function
reverse()
returns the
value
declared in the parameter "expression" or "uchar_expression"
in reversed order.
Syntax of the String Function reverse()
reverse ( "expression" | "uchar_expression" )
The parameters of the String Function reverse()
"expression"
The parameter "expression" can be a
column name,
variable
or
constant
and must be of one of the
datatypes
char,
varchar,
nchar,
nvarchar,
binary
or
varbinary.
If the parameter "expression" has a value of
NULL
then the return value will also be NULL. The parameter must be set in single or
double quotes if it is of the datatypes char, varchar, nchar or nvarchar.
"uchar_expression"
The parameter "uchar_expression" can be a
column name, variable or constant and must be of one of the datatypes
unichar
or
univarchar
If the parameter "uchar_expression" has a value of
NULL
then the return value will also be NULL.
Example for the String Function reverse()
select reverse("abcdefg")
go
-----
gfedcba
Returns "gfedcba".
select reverse("123abc")
go
-----
cba321
Returns "cba321".
select reverse(0x12345000)
go
-----
0x00503412
Returns "0x00503412".
See also:
ASE T-SQL - Aggregate Functions, ascii(), char(), char(n), charindex(), char_length(), compare(), difference(), lower(), ltrim(), patindex(), replicate(), right(), rtrim(), sortkey(), soundex(), space(), str(), String Functions, stuff(), substring(), to_unichar(), uhighsurr(), ulowsurr(), upper(), uscalar().
|