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
Post a Comment