Practical Exam Question Bank
Practical Exam Question Bank
2. Alter the EMP table to assign the empno column as the primary key
6.
17.
1. Display employee Nikhil’s employee number, name, department
number, and department location.
2. Display the list of employees who work in the sales department.
3. Display the list of employees who do not work in the sales department.
19.
a. Create sequence emp_sequence
Incremented by 2
Start with 1
Nomaxvalue
Nocycle
Cache 10;
b. Drop sequence emp_sequence;
20. Write a PL/SQL program that checks if a given number is positive, and
if it is, prints "Number is positive".
21. Write a PL/SQL program that asks the user for their age and then
prints “You can vote" if they are over 18, and "You cannot vote"
otherwise.
23. Write a PL/SQL program that asks the user to input a number (1 for
Monday, 2 for Tuesday, ..., 7 for Sunday) and prints the corresponding day
of the week.
28. Write PL/SQL function which will compute and return the maximum
of two values.