title: pl/sql procedure with savepoint
body: <p>I have a table employee with columns: id, name, department, salary. 
  I want to create a procedure which increase salary for all employees in a specific department and run procedure  if salary is less than 500, otherwise return to savepoint.
  I don't know how to write the exception</p>
  
  <pre><code>CREATE PROCEDURE `procedure1` (IN dep1 INT(11), IN sal1 INT(11))
  BEGIN
     SAVEPOINT point1;
     UPDATE employee SET salary=salary+sal1
     WHERE department=dep1;
     EXCEPTION
       WHEN salary&gt;500 THEN
     ROLLBACK TO point1;
   END
  </code></pre>