Subject row reference count
Author Gediminas
how to check, is row referenced in other tables via FK? I have
master-detail relation, so when I delete detail row, master row is
deleted also (set cascade on). In most cases this is ok, but sometimes
need to check, is any reference to erasable row - some tables may be
locked for changes, so cascading delete would destroy important data

Another question:
if I execute such delete code:
delete from table where "Name"="John";
how in trigger to check, that matching row (say, that PK is "Row_ID"
column) is referenced in other tables via FK?

Gediminas
-/ The Truth Is Out There /-