Prepend a Number with 0
Here's an interesting Script :-
DROP TABLE AX;
CREATE TABLE AX ( COL NUMBER );
INSERT INTO AX ( SELECT ROWNUM FROM ALL_OBJECTS WHERE ROWNUM < 10 );
SELECT TO_CHAR(COL,'00') FROM AX;
TO_
---
01
02
03
04
05
06
07
08
09
9 rows selected.
Labels: Prepend a Number with 0

0 Comments:
Post a Comment
<< Home