MySQL Forums
Forum List  »  Triggers

Re: Need help with my first trigger
Posted by: Devart Team
Date: May 23, 2012 06:57AM

You should use delimiters - whwich are statement separators used for source oblects.

DROP TRIGGER IF EXISTS berechne_gesamtsumme;

-- Set new delimiter $$
DELIMITER $$

CREATE TRIGGER  berechne_gesamtsumme
BEFORE UPDATE ON cat_spieler
FOR EACH ROW
BEGIN
  UPDATE cat_spieler SET gebuehr_basis = gebuehr_brunch;
END$$

DELIMITER ;

Note, that DELIMITER is not a MySQL command, it is a client command.

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

Options: ReplyQuote


Subject
Views
Written By
Posted
2211
K W
May 17, 2012 07:43AM
Re: Need help with my first trigger
1301
May 23, 2012 06:57AM


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.