Wednesday, October 22, 2008

SQL Practice Test 2

  1. Create a table student with fields stid number, stname varchar2, stavg number, stdoj date.
  2. Insert 4 continuous records into student as an user interaction.
  3. Insert 5 continuous records into students for only columns of stid and stdate and stname.
  4. Display all the records of student table where the concatenation of all the record column
  5. should be provided with heading as “Student Information”.
  6. Display all the records from emp table containing only sal, comm and sal+comm as monthly salary.
  7. Display all the records of emp table who is working in deptno 10 and working as ‘clerk’.
  8. Display all the records of emp table who was hired between 02/02/1980 and 12/22/2000.
  9. Display all the records of student table who is joined in the month of april.
  10. Display all the records of emp table whose comm is not null.
  11. Display all the records of emp table who is working as clerk or salesman.
  12. Display the names of all the students whose name contains either ‘e’ or ‘a’.
  13. Display al the records of emp table sorted in the descending order of deptno and for a particular deptno they should be ordered in ascending order of ename.
  14. Display date and timestamp of the present day.
  15. Display only the month & year of joining of each student from student table.
  16. Display the number of employees working in each department.

No comments:

Post a Comment

Disclaimer