Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you reverse a string in PostgreSQL?

Tags:

postgresql

I'm interested in reversing a string in PostgreSQL.

like image 884
Richard Price Avatar asked Sep 11 '10 00:09

Richard Price


2 Answers

PostgreSQL 9.1 and later includes a built-in function

 reverse(text)

http://www.postgresql.org/docs/current/static/functions-string.html

like image 166
Pat Avatar answered Dec 17 '22 13:12

Pat


Here you have reversing string function for PostreSQL:

http://a-kretschmer.de/diverses.shtml

like image 30
Tomasz Kowalczyk Avatar answered Dec 17 '22 13:12

Tomasz Kowalczyk