Not in MySQL 5.0. There is no error trapping mechanism to escape triggers as 
currently implemented. You are better off writing a stored procedure to do the 
INSERTs and have your application call the stored procedure.

-----Original Message-----
From: Ed Reed [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 13, 2007 7:09 PM
To: mysql@lists.mysql.com
Subject: before insert trigger

Is it possible for a trigger to test the data to be inserted and if it doesn't 
meet specific criteria not insert the data at all?

I have an application that writes a lot of data to my table. I don't have 
control over this application and it writes a lot more data then I need. So I'd 
like to have a trigger that doesn't allow certain records to be written at all. 
I can't seem to find anything in the documentation that describes what I'm 
looking for.

Thanks

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

Reply via email to