|
|
PL/SQL - LEVEL2
FUNCTIONS
1. Create a function which checks whether the given number is prime or not.
2. Create a function which checks whether the given year is leap year or not.
3. Create a function which returns the reverse of a number(12345--> 54321)
4. Create a function which checks whether the given number/string is a Palindrome
5. Create a function which counts the number of prime numbers in the given range.
6. Create a function that takes 2 parameters a,b & returns a^b.
TRIGGERS
1. Create a trigger on emp table to automatically increment the sals of emps by 10% (sal+comm).
2. Implement the 5th problem in PROCEDURES using triggers .
3. Create the following tables:
audit(compno,cmpname,annualincome,annualpay)
,defaulters(compno,compname),
correct(compno,compname).
4. Create a trigger which places a record of the company in respective table
when annualpay < 14% of annualincome.
annualpay < 14% of annualincome. -- defaulter
annualpay >= 14% of annualincome.== correct
Create a table: modifications(empno,type)
5. Create a trigger which inserts into modifications table empno & the type of modification done to it.(insert,update,delete)
Create the following tables:
request(item_num,qty,req_date),
inventory(item_num,qty_on_hand),
pending_orders(item_num,qty,issue_date)
6. Create trigger which inserts a row into the pending_orders table if there is enough qty_on_hand to issue, else prints "not possible"
|