Oracle Question For Student
Oracle Question For Student
Create Tables
1. Student Information Table
Column Name Student_ID Last_Name First_name DOB Address City Telephone Email Data Type Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Length 20 25 20 20 300 20 8 25 Constraint Type
4. Course Information
Column Name Course_ID Dept_ID Title Description Fees Duration Data Type Varchar2 Varchar2 Char Varchar2 Varchar2 Varchar2 Length 5 20 25 20 20 20 Constraint Type Primary Key
5. Class Table
Column Name Class_ID Class_Room Course_ID Dept_ID Ins_ID Start_Time Data Type Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Date Length 20 20 5 20 20 Constraint Type
Display the rows from the tables with the following criteria.
1. Display all information from the student table whose last_name is null. 2. Display the student Id and the First Name from the student table who doesnt have a telephone and email. 3. Display Students First Name whose city is Kathmandu. 4. Display Students Last Name whose state starts with the letter S 5. Display Students ID, Last Name whose state ends with the letter A. 6. Display Students First Name and Last Name Concatenated. 7. Display Students First Name and Last name Concatenated. 8. Display all information from the Student Table where the Students First name is only of five characters. 9. Display Students First Name, Id and their age. 10. Display Students Id whose age is greater than 20. 11. Display Student First Name, DOB whose birthday falls today. 12. Display the Students First Name, Address whose birthday fall in the month of January. 13. Display the eldest male students First Name from the Student table. 14. Display all information of the youngest female student from the Student Table. 15. Display the student id whose age is greater than 23 as on current date. 16. Display the students id whose age is greater than 25 as on the current date. 17. Display the Instructors First Name, last name concatenated together and the first character in capitals. 18. Display the Student First Name all in capitals. 19. Display the last day of the current month. 20. Display the first day of a given year. 21. Display the last day of a given year. 22. Display the number of months of the students since their birth. 23. Display the next date of that immediately follows the systdate. 24. Display the greater of two given dates. 25. Display the students date of birth rounded to the nearest month. 26. Display the average age of the students. 27. Display the number of unique cities from the student table. 28. Display the student id from the student table whose last name is unique. 29. Display the Students First Name, DOB in the format of DD-MONTH-YYYY. 30. Display the Student Id, First Name from the student table whose Telephone contains two zeros.