SQL Server String Functions
SQL Server string functions are scalar functions that perform an operation on a string input value and return a string or numeric value.
REVERSE Function
The REVERSE function gives you a mirror image of a given string. The following example returns the mirror image of employee last names:
SELECT REVERSE(LastName) AS MirrorImage, LastName AS FullLastName FROM DimEmployee
Results:
MirrorImage FullLastName
trebliG Gilbert
nworB Brown
ollerubmaT Tamburello
sretlaW Walters
sretlaW Walters
Tags:
SQL Server string functions are scalar functions that perform an operation on a string input value and return a string or numeric value.
REVERSE Function
The REVERSE function gives you a mirror image of a given string. The following example returns the mirror image of employee last names:
SELECT REVERSE(LastName) AS MirrorImage, LastName AS FullLastName FROM DimEmployee
Results:
MirrorImage FullLastName
trebliG Gilbert
nworB Brown
ollerubmaT Tamburello
sretlaW Walters
sretlaW Walters