Sunteți pe pagina 1din 1

Government Polytechnic, Porbandar

Computer Engineering Department

Semester: 6 Subject: PPD

Practical Exercise – 7

AIM: MySQL Stored Procedure.

1. Give brief overview of Stored Procedure.


2. Give advantages and disadvantages of Stored Procedure.
3. Use below tables:
Product_mstr
Product_id Product_name Price

Product_price_history
Product_id New_price Old_price Change_Date

I. Write a stored routine to count all product ids/types.


II. Write a stored routine to Display Products with price > 5000.
III. Write a routine to increase price of all products by 5%.
IV. Update routine of (III) to increase price of all products by 10% instead of 5%.
V. Write down query to delete a stored routine.

4. Write down a stored procedure to find maximum of 3 numbers.


5. Write down a stored procedure to calculate factorial of any number.

S-ar putea să vă placă și