something similar to "on delete cascade" ?

Поиск
Список
Период
Сортировка
Искать

something similar to "on delete cascade" ?

От:
"Albrecht Berger" <berger1517@gmx.ch>
Дата:
Hello,
I need something similar to the "on delete cascade" statement which
doesn't "listen" to the deletion of a row, but to a change of a column.

Do something like that exist ?

My problem is that i don't want to delete datarows, but to set a "deleted"
flag.
In every by a foreign key "linked" row should this deleted flag set
automatically.

Thx
berger




Re: something similar to "on delete cascade" ?

От:
Josh Berkus <josh@agliodbs.com>
Дата:

Berger,

> My problem is that i don't want to delete datarows, but to set a "deleted"
> flag.
> In every by a foreign key "linked" row should this deleted flag set
> automatically.

You need to create a custom TRIGGER or RULE.  The online docs have extensive 
instructions and examples of triggers and rules.

-- 
-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________                                       Josh Berkus  Complete information technology 	josh@agliodbs.com   and data management solutions 	(415) 565-7293  for law firms, small businesses 	 fax 621-2533   and non-profit organizations. 	San Francisco




FAQ