Page 1 of 1
How to stop a row from being deleted using trigger?
Posted: Fri May 26, 2006 7:24 am
by raghavan20
Is it possible to detect when a row is tried to be deleted and stop it from deleting?
let's take a simple row:
name id
rag 4
I do not want this row deleted somehow using trigger or ?
Posted: Fri May 26, 2006 7:27 am
by timvw
Which SQL DBMS are you using? Most have a TRIGGER INSTEAD OF DELETE construct...
Posted: Fri May 26, 2006 7:38 am
by raghavan20
timvw wrote:Which SQL DBMS are you using? Most have a TRIGGER INSTEAD OF DELETE construct...
I am working on mysql.
I do not want anyone to accidentally delete some important rows in tables which are meant to be there all the time. I want to stop people from deleting it somehow.
timvw, do you know any good editor for triggers, because navicat or query browser do not support triggers properly. Use of 'show triggers' does give us only the body of the trigger which is not really so useful.
Thanks