From: "Patrik Wallstrom"
> Using 5.0.7-beta the "drop trigger" functions in a very mysterious
> way:
>
> mysql> use testdb;
> mysql> drop trigger foo;
> ERROR 1064 (42000): You have an error in your SQL syntax; check the
> manual that corresponds to your MySQL server version for the right
> syntax to use near '' at line 1

MySQL is correct here: the syntax is
    drop trigger <tablename>.<triggername>;
http://dev.mysql.com/doc/mysql/en/drop-trigger.html

> mysql> drop trigger testdb.foo;
> ERROR 1146 (42S02): Table 'testdb.testdb' doesn't exist

It seems to me that the table testdb doesn't exist (anymore).
Was the trigger 'foo' created for table 'testdb'? Trigger are associated
with tables, not databases (yet).
http://dev.mysql.com/doc/mysql/en/create-trigger.html

If you previously created the trigger for table 'bar', the command should
read:
    drop trigger `bar`.`foo`;

Regards, Jigal.


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

Reply via email to