日期:2014-05-17 浏览次数:21173 次
select reverse('123456') from dual;
------解决方案--------------------
DECLARE
a Varchar2(50):=123456;
b Varchar2(50);
c Varchar2(50);
BEGIN
FOR i IN reverse 1..length(a) LOOP
b:=substr(a,i);
a:=substr(a,1,i-1);
c:=c||b;
END LOOP;
dbms_output.put_line(c);
END;