MySQL Forums
Forum List  »  Triggers

Trigger on select
Posted by: omri swissa
Date: July 09, 2008 11:07AM

Hi,
I know triggers can be on Insert, Update, Delete and etc… but not on select statements. I wonder if there is a way that I can put a trigger or something else on select. What I’m looking for is a “select rule”.
For example: if I have table named “tb_example” with the following columns: “id, name”. I want to set a rule that every select "when id <0 return id = 0".

So this query: “select * from tb_example where id = -8” and this query: “select * from tb_example where id = 0” will return the same value.

Do you know something that fits to what I’m looking for?

Thanks,
Omri

Options: ReplyQuote


Subject
Views
Written By
Posted
Trigger on select
12025
July 09, 2008 11:07AM
5423
July 12, 2008 11:27AM
4125
September 12, 2008 07:42AM


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.