Opening Hours :7AM to 9PM
IF(Condition 1)THEN ... ... ELSIF( Condition 2) THEN ... ... ELSIF( Condition 3) THEN ... ... ... ... ELSE ... ... END IF;
DECLARE c_id customers.id%type := 2; c_sal customers.salary%type; BEGIN SELECT salary INTO c_sal FROM customers WHERE id= c_id; if( c_sal>0 and c_sal<=10000) then 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; else dbms_output.put_line('invalid details'); end if; END; /