Adrian Co wrote:

> Hi,
> 
> Yes, the syntax is not valid. I have tried it. :-)
> 
> I was hoping for maybe a workaround to simulate the described
> functionality. There might also be something wrong with the structure of
> my script. Maybe I shouldn't be creating triggers there? But I was
> thinking if the CREATE DATABASE and CREATE TABLE have a IF NOT EXISTS
> functionality, why should the triggers be any different? Maybe this is
> just an oversight, maybe the CREATE TRIGGER should have a IF NOT EXISTS
> functionality also? or I'm just doing something very wrong.
> 
> Maybe someone can point me in the right direction?
>

Hi Adrian

you can check whether a trigger exists by querying the information schema
database:
http://dev.mysql.com/doc/refman/5.0/en/triggers-table.html

Hope that helps.

Cheers
Frank


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to