आप इसे आजमा सकते हैं
delimiter //
CREATE TRIGGER b_I_O AFTER UPDATE ON book
FOR EACH ROW
BEGIN
IF (OLD.status IS NOT NULL AND NEW.status IS NOT NULL AND NEW.status != OLD.status ) THEN
INSERT INTO book_in_out (`astatus`, `bid`, `time`) VALUES(NEW.status, OLD.id, NOW());
END IF;
END;//
delimiter ;