title: SQL commit not working
body: <p>I am trying to use rollback to get back to the previous statement where I commit.But it's not working.It always shows the current statement. Which means commit is not working? How can I solve it?</p>
  
  <pre><code>drop table departments_dup;
  create table departments_dup
  (
   dept_no char(4),
   dept_name varchar(40)
   );
  
  insert into departments_dup
  select * from departments;
  
  SELECT 
      *
  FROM
      departments_dup
  ORDER BY dept_no;
  
  commit;
  
  UPDATE departments_dup 
  SET 
      dept_name = 'Quality Control',
      dept_no = 'd021';
  
  ROLLBACK;
  </code></pre>