You are on page 1of 9

ORACLE PRACTICAL EXAMINATION

INSTRUCTIONS
1. Time allowed 3 hours
2. Attempt all questions

There are two sections


a. Theory questions
b. Practical questions

Section A (Theory questions each QUESTION carries 5 marks total 5*5=25marks )

1. Write an SQL command for creating a table like the one shown below

NAME AGE GENDER PHONE_NUMBER


MARYANN 080000002

2. Give a brief explanation using simple and short examples of the following functions

avg----average , count, max---maximum, min----minimum, sum

3. List the four common data types used in oracle

4. Give the commands for making the screen clear and exiting the oracle application

5. What is a PRIMARY KEY and a NULL VALUE.

Section B (Practical questions each carries 15 marks total 15*5=75 marks)


1. create a table with the following fields:
Name,age,qualification,phone_no,city,country
(Insert 6 records,only Rwanda and Burundi,age should be 21,35,28,17,30,23)

a.Change table name from employee to empinfo


b.Change column from country to payee
c.Display qualification and city in ascending order of age
d.Increase the age of student who is 17 to be 18
e. Write a sub query to select phone-no using a where clause on age.

All the best ISAACK

ORACLE PRACTICAL EXAMINATION


INSTRUCTIONS
1. Time allowed 3 hours
2. Attempt all questions

There are two sections


c. Theory questions
d. Practical questions

Section A (Theory questions each QUESTION carries 5 marks total 5*5=25marks )

1. Write an SQL command for creating a table like the one shown below

NAME AGE GENDER PHONE_NUMBER


MARYANN 080000002

2. Give a brief explanation using simple and short examples of the following functions

avg----average , count, max---maximum, min----minimum, sum

3. List the four common data types used in oracle

4. Give the commands for making the screen clear and exiting the oracle application

5. What is a PRIMARY KEY and a NULL VALUE

Section B( Practical questions each carries 15 marks total 15*5=75 marks)

2. Use the table in section A 1.


(Enter 5 records in table ,3 female and 2 male and the table name is friends)
a. Create a view on above table called pals to show Name and age only.
b. Use IN and LIKE operations in your table friends.
c. Add four more records on your table with the same names as the records
already in the table.
d. Delete the first record from the table and arrange the remaining records in the
descending order of age.
e. Show the distinct gender from the table

All the best ISAACK

ORACLE PRACTICAL EXAMINATION


INSTRUCTIONS
1. Time allowed 3 hours
2. Attempt all questions

There are two sections


e. Theory questions
f. Practical questions

Section A (Theory questions each QUESTION carries 5 marks total 5*5=25marks )

1. Write an SQL command for creating a table like the one shown below

NAME AGE GENDER PHONE_NUMBER


MARYANN 080000002

2. Give a brief explanation using simple and short examples of the following functions

avg----average , count, max---maximum, min----minimum, sum

3. List the four common data types used in oracle

4. Give the commands for making the screen clear and exiting the oracle application

5. What is a PRIMARY KEY and a NULL VALUE

Section B( Practical questions each carries 15 marks total 15*5=75 marks)

3.Create two tables


Name Gender Age RegNo

RegNo Qualification Salary

(Enter 4 records)
a. Display Name,Age,qualification and salary
b. Show Name RegNo and Gender in the descending order of Age
g. Add 2 more records on the first table (TRAINEES)
h. Use AND , OR , NOT operators in your first table
i. Rename table TRAINEES to INTERMS

All the best ISAACK

ORACLE PRACTICAL EXAMINATION


INSTRUCTIONS
1. Time allowed 3 hours
2. Attempt all questions

There are two sections


j. Theory questions
k. Practical questions

Section A (Theory questions each QUESTION carries 5 marks total 5*5=25marks )

1. Write an SQL command for creating a table like the one shown below

NAME AGE GENDER PHONE_NUMBER


MARYANN 080000002

2. Give a brief explanation using simple and short examples of the following functions

avg----average , count, max---maximum, min----minimum, sum

3. List the four common data types used in oracle

4. Give the commands for making the screen clear and exiting the oracle application

5. What is a PRIMARY KEY and a NULL VALUE

Section B( Practical questions each carries 15 marks total 15*5=75 marks)

4. Create the following table:


Name Age Telephone City Total Sal. Sal. Paid Bal
Jack 21 011000 Kigali 20000 10000
Max 35 1121110 Kigali 17000 15000
Loi 32 35000 Gitarama 40000 45000
Tim 43 480000 Gitwe 38000 60000
Joy 23 54000 Butare 75000 50000
Jane 25 0880011 Kigali 30000 130000

a. Display the greatest and the least between (Telephone , TotalSal , SalPaid and
Balance).
b. Arrange balance in the ascending order of Name.
c. Display Age , city and salpaid of person whose name start with letter J
d. Change the telephone no. of the person whose city starts with letter B to
5401010
e. Perform the following operations: Avarage , sum ,minimum ,maximum and
count on the Total salary.
All the best ISAACK

ORACLE PRACTICAL EXAMINATION

INSTRUCTIONS
1. Time allowed 3 hours
2. Attempt all questions

There are two sections


l. Theory questions
m. Practical questions

Section A (Theory questions each QUESTION carries 5 marks total 5*5=25marks )

1. Write an SQL command for creating a table like the one shown below

NAME AGE GENDER PHONE_NUMBER


MARYANN 080000002

2. Give a brief explanation using simple and short examples of the following functions

avg----average , count, max---maximum, min----minimum, sum

3. List the four common data types used in oracle

4 Give the commands for making the screen clear and exiting the oracle application

5. What is a PRIMARY KEY and a NULL VALUE

Section B( Practical questions each carries 15 marks total 15*5=75 marks)

4 Population
City Male Female Total
Kigali 30000 60000
Gitwe 70000 90000
Gitarama 100000 300000
Butare 90000 1200000
Byumba 50000 50000

a. Create table population and show the command that would fill the values
where there are null values.
b. Create a view of population1 with the name popview to display Male and
Female column
c. Delete the records of Gitwe from the table and show this effect on popview.
d. Write a subquery to show Male basing on Total population.
e. Increase the population of Male in Gitarama by 3000.

All the best ISAACK

ORACLE PRACTICAL EXAMINATION

INSTRUCTIONS
1. Time allowed 3 hours
2. Attempt all questions
There are two sections
n. Theory questions
o. Practical questions

Section A (Theory questions each QUESTION carries 5 marks total 5*5=25marks )

1. Write an SQL command for creating a table like the one shown below

NAME AGE GENDER PHONE_NUMBER


MARYANN 080000002

2.Give a brief explanation using simple and short examples of the following functions

avg----average , count, max---maximum, min----minimum, sum

3 List the four common data types used in oracle

4 Give the commands for making the screen clear and exiting the oracle application

5. What is a PRIMARY KEY and a NULL VALUE

6.Create a table with the following field (tablename is


countries)
Country Capital Currency Population
Rwanda Kigali Francs 500000
Uganda Kampala Shillings 300000
Burundi Bujumbura Francs 400000
Kenya Nairobi Shillings 700000
Tanzania Dodoma Shillings 900000

a. Change capital of Tanzania to Dar-es-salaam.


b. Write a subquery to show the currency basing on population.
c. Change the currency of countries which are using shilling to be francs
d. List the countries in Ascending order of population.
e. Use the following operation on your table(AND ,OR,NOT)

All the best ISAACK


ORACLE PRACTICAL EXAMINATION

INSTRUCTIONS
1. Time allowed 3 hours
2. Attempt all questions

There are two sections


p. Theory questions
q. Practical questions

Section A (Theory questions each QUESTION carries 5 marks total 5*5=25marks )


1. Write an SQL command for creating a table like the one shown below

NAME AGE GENDER PHONE_NUMBER


MARYANN 080000002

2. Give a brief explanation using simple and short examples of the following functions

avg----average , count, max---maximum, min----minimum, sum

3. List the four common data types used in oracle

4. Give the commands for making the screen clear and exiting the oracle application

5 What is a PRIMARY KEY and a NULL VALUE

7. Create a table of your choice with tuples and 4 Domains.


a. It should contain registration number
(RegNo which should be the Primary key)
b. The ages should be between 23 and 26 only.
c. It should contain salary column

Perform
i. Display RegNo and salary of people below 24 years old.
ii. Gives the Average salary.
iii. Delete record no 5 from the table
iv. Create a view of the above table show the column of RegNo and Age

All the best ISAACK

ORACLE PRACTICAL EXAMINATION

INSTRUCTIONS
1. Time allowed 3 hours
2. Attempt all questions

There are two sections


a.Theory questions
b. Practical questions
Section A (Theory questions each QUESTION carries 5 marks total 5*5=25marks )

1. Write an SQL command for creating a table like the one shown below

NAME AGE GENDER PHONE_NUMBER


MARYANN 080000002

2. Give a brief explanation using simple and short examples of the following functions
avg----average , count, max---maximum, min----minimum, sum

3. List the four common data types used in oracle

4. Give the commands for making the screen clear and exiting the oracle application

5. What is a PRIMARY KEY and a NULL VALUE

8. Create the following tables


GOVERNMENT

Passport Name District

DISTRICT

PassNo Age Destination

Instructions
. Destination should contain country names.
. Each table to contain 6 records.
. Passport No and PassNo are same values and Passport No is Primary keys

Work
a. Display Name , PassNo and Destination
b. Display Age and destination in ascending order of age
c. Create a view of table government to show Passport No and District ,then add one
record on PassportNo table and show it on view
d. Change tablename of DISTRICT to BIRTHPLACE.
All the best ISAACK

ORACLE PRACTICAL EXAMINATION

INSTRUCTIONS
1. Time allowed 3 hours
2. Attempt all questions

There are two sections


r. Theory questions
s. Practical questions

Section A (Theory questions each QUESTION carries 5 marks total 5*5=25marks )

1. Write an SQL command for creating a table like the one shown below

NAME AGE GENDER PHONE_NUMBER


MARYANN 080000002
2. Give a brief explanation using simple and short examples of the following functions

avg----average , count, max---maximum, min----minimum, sum

3. List the four common data types used in oracle

4. Give the commands for making the screen clear and exiting the oracle application

5. What is a PRIMARY KEY and a NULL VALUE

9. Create table ISPG with fields;


StudName
Age
RegNo
Gender
Student
Teachername
Instruction
Enter 6 records
RegNo is Primarykey
Teacher’s name of 2nd record is a null value
Gender is 3 female and 3 male
Work

1. Use IN, LIKE and BETWEEN operator in your table.


2. Change the column gender to sex
3. Use math function average,sum,count,min,max on the age field.
4. Display subject, RegNo, Age in Ascending order of Teachername
5. Change the tablename from ISPG to Infotechstud.

All the best ISAACK.

You might also like