MySQL Forums
Forum List  »  Newbie

Problem with trigger
Posted by: Abdel coucis
Date: June 01, 2005 08:14AM

Hello everybody.

MySQL 5.0.4
OS Windows XP Pro

I would like to create a trigger on the table CASES.

each time, a row is inserted I would like to create on in TASKS table

CREATE TRIGGER trig_case_task AFTER INSERT ON CASES
FOR EACH ROW
INSERT INTO TASKS ( `id`, `date_entered`, `assigned_user_id`, `name`, `priority`, `description`, `status`, `modified_user_id`, `deleted`)
VALUES (UUID(),CURRENT_TIMESTAMP,'1','A case is create','High','A case is open','Not Started','1','0');

The syntax is accepted by MySQL.

If I try to create it again :
#1359 - Trigger already exists

In the database information_schema , there is not a trigger table which tells me if the trigger exits.

Thanks a lot

Options: ReplyQuote


Subject
Written By
Posted
Problem with trigger
June 01, 2005 08:14AM
June 01, 2005 08:55AM
June 01, 2005 09:25AM


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.