1) Give the details of employees who have been hired between 09-JUN-81 And 31-DEC-04.
a) select * from emp where hiredate between '09-JUN-81' And 31-DEC-04
2)Write a query to display dept no , lowest salary and highest salary in each department.
a) select deptno,min(sal),max(sal) from emp group by deptno;
3)Write a query to display the tomorrow date and next week date.
a)select sysdate+1,next_day(sysdate,'saturday') from dual;
4)Write a query to display the dates for one day after and one day before.
a)select sysdate+1,sysdate-1 from dual;
5)Write a query to display the system date and previous date.
a)select sysdate,sysdate-1 from dual;
6) Write a query to display the current date and time.
a)select to_char(to_date(sysdate,'dd-mm-yyyy'),'dd-hh24:mi:ss') from dual;
7)List the names, dept of all employees whose hire date anniversary does exits in the first quarter of the year.
a)select ename,deptno where to_char(hiredate,'q')<>1;
8)Find Century in which BALKE joined.
a)select to_char(hiredate,'cc') from emp where ename='BLAKE';
9)Find out which quarter of the year the employees joined.
a)select to_char(hiredate, 'q') from emp;
10)List the names and hire date of the employees in dept no 20, display hire date formated as 12/03/1984.
a) select to_char(hiredate,'dd/mm/yyyy') from emp where deptno=20;
Subscribe to:
Post Comments (Atom)
MY HIT COUNTER
Blog Archive
-
▼
2009
(38)
-
▼
November
(27)
- few programs on bank project
- customer identification number
- bank programs
- min balance program in oracle
- cards balance
- real time programs in bank project
- real time registration example
- Creation of tables in oracle
- practice quries
- quries
- reverse number
- throws exception
- throws exception
- divide by zero
- array index
- length of a string name
- no parameters to string
- print two parameters
- abstract class in core java
- inside area of rectangle
- area of rectangle
- three string parameters
- class b extends a
- incremeting numbers
- sum of three parameters
- box program
- strings
-
▼
November
(27)
Custom Search
No comments:
Post a Comment