The REVERSE Function

John Morehouse explains what the REVERSE function is and why it can be useful:

Recently I had a conversation with a colleague that wasn’t aware of the REVERSE function in SQL Server.  I had sent them a code snippet and they inquired as to what the purpose of the function was.  Essentially, this function that reverses any string value.

For example, the phrase:

The brown dog jumped over the lazy fox

reversed looks like this

xof yzal eht revo depmuj god nworb ehT

Read on to see a good example of when you might use REVERSE.

Related Posts

Palindromes In SQL

Lukas Eder rises to a challenge: SQL is a really cool language. I can write really complex business logic with this logic programming language. I was again thrilled about SQL recently, at a customer site: Writing some nifty SQL queries for a customer. Wondering why anyone would even consider using a 3GL for any business logic at all?? […]

Read More

Your Reminder Not To MERGE

Kevin Wilkie points out the numerous problems with the MERGE operator: Now, when I last posted, I’m sure you thought I was done talking about the MERGE statement. You are so wrong, compadre! One more post is absolutely needed! There are a few issues with the MERGE statement. Well, as of this writing, there are 361 possible issues according […]

Read More

Categories

June 2017
MTWTFSS
« May Jul »
 1234
567891011
12131415161718
19202122232425
2627282930