MySQL Forums
Forum List  »  Triggers

Re: How to Raise Error ?
Posted by: Andrew Gilfrin
Date: February 23, 2006 04:42AM

The problem with doing this is you have no idea what cause the error, say for example you use (just for a quick and easy example) the duplicate record error that Zigmund mentiond how do you know which area of MySQL raised it? Was it the original SQL statement or was it the trigger, almost any error you chose has the potential to be raised during processing and you are not dealing with it correctly.

Secondly what if you want to raise 3 different errors in your trigger? Using the same method 3 times and you won't know which specific one was raised.

Andrew Gilfrin
------------------
http://gilfster.blogspot.com
My MySQL related Blog

http://www.mysqldevelopment.com
MySQL Stored Procedure,Trigger, View.... (Just about most things these days) Information

Options: ReplyQuote


Subject
Views
Written By
Posted
25287
November 17, 2005 04:00AM
16829
November 17, 2005 06:58AM
23787
November 19, 2005 08:53AM
14598
February 23, 2006 02:28AM
Re: How to Raise Error ?
10865
February 23, 2006 04:42AM
15582
February 24, 2006 08:28AM
8570
February 24, 2006 10:15AM
6349
February 24, 2006 12:42PM
7968
February 27, 2006 08:56AM
6761
February 27, 2006 11:27AM
18971
February 28, 2006 05:22AM
6619
December 20, 2006 03:34AM
4172
November 18, 2008 08:28AM
4835
November 18, 2008 12:45PM
6255
December 19, 2006 11:00AM
5059
December 19, 2006 02:35PM
6302
December 19, 2006 07:53PM
4483
December 20, 2006 03:37AM
4695
December 19, 2006 11:01AM
5575
November 24, 2006 05:32AM
4545
November 24, 2006 07:02AM
3682
December 23, 2008 06:08AM
11333
February 25, 2006 11:48PM
5021
December 19, 2007 04:24AM
4004
December 24, 2008 01:02PM
4826
December 19, 2007 03:59AM
4704
December 19, 2007 05:09AM
3584
November 18, 2008 08:25AM
3967
November 18, 2008 12:49PM
6082
December 19, 2007 04:46AM


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.