Beruflich Dokumente
Kultur Dokumente
15.select trim(' 1234 ') T1 , trim('0' from '000012340000') T2, trim(leading '0'
from '000012340000') T3, trim(trailing '0' from '000012340000') T4,trim(both '0'
from '000012340000') T5 from dual;
16.REPLACE(string1, string2, string3), returns string2 replaced by string3 inside
string1
Display the empno,ename from emp table. Wherever job manager is found it
should be displayed as boss
17.NVL & NVL2
NVL(value1, value2) converts all null value1 to an actual value2.
select ename, nvl(comm,0) comm,
nvl(hiredate,to_date('01/01/1980','mm/dd/yyyy'), nvl(job, 'UNKNOWN JOB') from
emp;
NVL2(value1, value2, value3), if value1 is not null,then return value2, if its null,
return value3.
select ename, nvl2(comm, comm*1.1, 100) new_comm from emp;
18.Syntax - decode(col/expression, --decode(col/expression, case1, result1,
[,case2,result2?] [,default])
Write a query to display the total number of employees and the total number of
employees hired in 1980, 1981, 1982, 1983.