sql (lpad function)
747484May 10 2010 — edited May 11 2010I came across this function in a certification book i.e. lpad(' ',<integer>) in a hierarchial query like this:
SELECT LEVEL, EMPNO, LPAD(' ',LEVEL * 2) || JOB TITLE FROM EMP
START WITH EMPNO = 7839
CONNECT BY MGR = PRIOR EMPNO;
The query works fine. But the actual syntax for lpad fn is lpad(<string>,<number of times to pad>[,padding string]). So why is there a difference in syntax for lpad?