0% found this document useful (0 votes)
9 views2 pages

Document 5

Uploaded by

moiz73824
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Document 5

Uploaded by

moiz73824
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Select 'job_id for' || UPPER(last_name)|| ' is ' || LOWER(job_id) As "employee_detail" from

employees;

-------------------------------------------

Select employee_id,last_name,department_id from employees where INITCAP(last_name)


='Higgins';

----------------------------------------------

Select employee_id, CONCAT(first_name,last_name) name,job_id,length(Last_name),


INSTR(last_name,'a') "contain'a'?"

from employees where SUBSTR(job_id,4)='REP';

__________________________________________

Select last_name,salary,MOD(salary,5000) from employees where job_id='SA_REP';

______________________________________________

Select last_name, (sysdate-hire_date)/7 as weeks from employees where department_id


=90;

________________________________________

Select employee_id, hire_date,Months_between(sysdate,hire_date)


tenure,add_months(hire_date,6) Review, next_day(hire_date,'friday'),last_day(hire_date)

from employees where months_between(sysdate,hire_date)>156;

___________________________________________

Select employee_id, to_char(hire_date,'MM/YY') month_hired from employees;

___________________________________________

Select last_name,to_char(hire_date,'DD-MM-YYYY') from employees where hire_date >


to_date('01-jan-90','DD-Mon-RR');

____________________________________________

select hire_date from employees;

_____________________________________________

Select last_name, salary,NVL(commission_pct,0),(salary*12)+(Salary


*12*NVL(commission_pct,0)) AN_SAL from employees;
__________________________________________________________

Select last_name, salary,NVL2(commission_pct,'SAL_com','sal') income from employees


where department_id IN(50,80);

____________________________________________________

You might also like