Cascading Deletes In Sql
If you wish to manually perform cascading deletes, an ingenious way to do this is to use a "not exists" keyword
DELETE FROM schema.a s WHERE a < 5
DELETE FROM schema.btsl WHERE not exists ( select * from schema.a ts where tsl.ID = ts.ID and tsl.VERSION = ts.VERSION);
page revision: 9, last edited: 18 Feb 2010 23:24