Opening Hours :7AM to 9PM
IF( Condition 1)THEN ... ... IF(Condition 2) THEN ... ... ELSE .... .... END IF; ELSE ... .... END IF;
DECLARE c_id customers.id%type := 3; c_sal customers.salary%type; BEGIN SELECT salary INTO c_sal FROM customers WHERE id= c_id; if(c_sal>=1000 and c_sal<=2000) then update customers set salary=c_sal+100 where id= c_id; elsif(c_sal>=3000 and c_sal<=6000) then update customers set salary=c_sal+200 where id= c_id; elsif(c_sal>=7000 and c_sal<=10000) then update customers set salary=c_sal+500 where id= c_id; else update customers set salary=c_sal-1000 where id= c_id; end if; END; /