I have a table called login having 3 fields 'id','token' and 'status' . id is auto generating . I want to store the auto generated 'id' in the field 'status' whenever an insert into that table happens using trigger.Can i do this using insert after trigger?This is my first go at triggers, so any help would be greatly appreciated. My code is given bellow..
CREATE TRIGGER ins_masterid AFTER INSERT ON `login`
FOR EACH ROW BEGIN
SET NEW.status = NEW.id;