sql - How to swap first character with last character in ename column -


how swap first character last character in ename column employee table. amusing emp table default in sql* plus

i have tried dual replace , no success.

ex : smith name , expected output hmits

just using substr() 3 times fetch first, last , rest of characters. , concatenate them all

select substr(ename,length (ename) )|| substr(ename,2,length(ename)-2)|| substr(ename,1,1) employee


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -