MySQL Forums
Forum List  »  Triggers

Re: ERROR 1442 - Cannot update table which has trigger
Posted by: Devart Team
Date: November 13, 2012 01:30AM

It is a restriction. You cannot modify trigger's table. Try to use something like this -

CREATE TRIGGER trigger1
  BEFORE UPDATE
  ON driver
  FOR EACH ROW
BEGIN
  IF NEW.break_finish_time >= NOW() AND NEW.break_start_time <= NOW() THEN
    SET NEW.is_available = 0;
  END IF;
END

Devart Company,
MySQL management tools
http://www.devart.com/dbforge/mysql/

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: ERROR 1442 - Cannot update table which has trigger
8917
November 13, 2012 01:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.