Professional Documents
Culture Documents
Practical-6
AIM: Study the concepts of different operators, aggregate functions and various joins.
2) Write pl/sql code to add 50% salary of ‘Riya’ and 70% salary of ‘Rima’ to salary of ‘Rekha’.
Query and Output:
3)Write pl/sql code that will accept emp_no and debit amount from user. If balance is below 500/-
whenever you debit the amount then give error message that "Balance below 500/-" otherwise
update the table. Use following table.
Query and Output:
4)Write pl/sql code to change the salary to 6000 if the salary of employee no 1001 is less than 6000.
The salary change is to be recorded in the old_salary table with date on which salary changed. Use
table employee_details & create new table: old_salary (emp_no, previous_salary, change_date).
5)Write pl/sql code to find sum of first N natural numbers. Take value of N from user. Write code
using: a) exit loop (basic loop) b) while loop.
6)Write pl/sql code to find Factorial of a number using: a) label and goto statement b) for loop