You are on page 1of 1

Oracle

SQL – Select Query


Q1. Create the following table in oracle and add 10 records .

Table name : Student01

Reg varchar2(20) primary key, [ R-001, R-002 etc ]


Roll int ,
Class varchar2(5), [ example : X, XI,VIII etc ]
Dob date,
Sub1 int,
Sub2 int,
Sub3 int,
Total int

Write the following SQL


1. Creating the table
2. Insert one record.
3. Insert record without total,
4. Show the record whose Reg is : R-003
5. Show records whose reg is R-002 and R-006.
6. Show all records whose class is IX
7. Show all records whose class is not VIII.
8. Show records whose Sub1 mark is more than 75.
9. Show records whose Sub1 mark is more than 60 but sub2 mark is less than 50.

Oracle Ques 2

Create table And answer the following :

Table name : Stud02_Details

Roll int Primary key


Sname varchar2(20)
Fname varchar2(20)
DOB date,
Phone int,
Email varchar2(20) Add 5 records in each table.

1. Calculate total and Avg.


Table : Marks 2. Show all records (with details and marks).
3. Show name and total of all students.
Roll int primary key , 4. Show name, phone, total and avg whose name started
Beng int, with S and avg more than 75.
Eng int
Math int
Total int
Avg int

You might also like