Try the documentation.

http://mysql.com/triggers
sends you to
http://dev.mysql.com/doc/refman/5.0/en/triggers.html
from there you can click on "CREATE TRIGGER SYNTAX"
to get to
http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html
which clearly shows that syntax is not valid.

Alternatively, you could try it yourself and see that it fails.

-Sheeri

On 4/7/06, Adrian Co <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Sorry if I wasn't very clear with my question. I was hoping to obtain
> the functionality such that I could do something similar to:
>
> CREATE TRIGGER IF NOT EXISTS ....
>
> Because I usually get a trigger already exists in my script. I might be
> missing something.
>
> The script basically does the basic things like create database if not
> exists, create table if not exists, etc. I was hoping the same thing for
> triggers maybe? Is this possible?
>
> Regards,
> Adrian Co
>
> Jim wrote:
>
> >There is a TRIGGERS table in the information_schema
> >
> >Eg.
> >select Trigger_Name from TRIGGERS
> >where trigger_name = 'TI_AGENT' AND trigger_schema = 'PROPLINK'
> >
> >
> >-----Original Message-----
> >From: Adrian Co [mailto:[EMAIL PROTECTED]
> >Sent: Friday, 7 April 2006 1:54 PM
> >To: mysql@lists.mysql.com
> >Subject: Determining if a trigger exists
> >
> >Hi,
> >
> >Whats the simplest way to determine if a trigger already exists?
> >
> >i.e. For tables you have: CREATE TABLE IF NOT EXISTS ...
> >
> >Is there a way to do
> >
> >CREATE TRIGGER IF NOT EXISTS
> >
> >I'm using MySQL 5.0 btw.
> >
> >Thanks!
> >
> >Regards,
> >Adrian
> >
> >
> >
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>
>

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

Reply via email to