You are on page 1of 1

196170307143 3360702

Practical-8.b
Manipulate on routines such as write a routine for updating price of all
product by 5% and other such routines can be performed.
➢ Create an event that checks the product types having quantity less than 20 at
every ten minutes.
CREATE EVENT p_quantity
ON SCHEDULE
EVERY 10 MINUTES
COMMENT 'Clears out sessions table each 10 minutes.'
DO
Select p_type from products where p_quantity<20;

➢ Create an event that checks the product which has been sold maximum in a day.

CREATE EVENT p_sold


ON SCHEDULE
EVERY 10 MINUTES
COMMENT 'Clears out sessions table each 10 minutes.'
DO
Select *from products HAVING MAX(p_sold_in)=1;

You might also like