Professional Documents
Culture Documents
==================================================================
select last_name from employees;
select last_name, lower(last_name) from employees; (to print the record in to lo
wer case)
select last_name, upper(last_name) from employees; (to print the record in to up
per case)
select last_name, upper(last_name),upper('virag') from employees; (to print the
record in to upper case)
select upper('virag') from dual; (by default a blank table its owner is sys)
select initcap('virag shah') from dual; (to print the data in the capitalize sen
tance)
select concat('virag', 'shah') from dual; (to concetinate the to parameter)
select substr ('dbaconsultant',1,3) from dual; (to print the some object)
select substr ('dbaconsultant',4) from dual; (from the starting point to all cha
racter)
select substr ('dbaconsultant goregaon',-4) from dual; (with negetive mark)
select length (last_name), last_name from employees; (length of the column data)
select instr('dbaconstanct','a',1,1) from dual;
select instr('dbaconstanct','a',-1,1) from dual; (with negetive)
select salary, lpad(salary,10,'*') from employees; (left padding)
select salary, rpad(salary,10,'*') from employees; (right padding)
select trim(leading 'd' from 'dd dbaconsultantdd') from dual; (trim from the lef
t side)
select trim(trailing 'd' from 'dd dbaconsultantdd') from dual; (trim from the ri
ght side)
select trim(both 'd' from 'dd dbaconsultantdd') from dual; (trim from both side
by default it is both)
select replace ('vs shah','vs','virag') from dual; (replace the with object)
select replace ('vsshvsah','vs') from dual; (replace without the replacer)
select round (776.228,2) from dual;