Your foreign key is a CONSTRAINT which by it's nature won't allow you to delete a cust row that is referenced in Sale. You don't need a trigger.EDIT:
See for yourself:create table cust (custid int primary key clustered)gocreate table sale (custid int references cust(custid), i int)insert cust values (1)insert sale values (1, 1)go--This will cause an errorprint 'try the delete'delete cust where custid = 1godrop table saledrop table custOUTPUT:(1 row(s) affected)(1 row(s) affected)try the deleteMsg 547, Level 16, State 0, Line 3The DELETE statement conflicted with the REFERENCE constraint "FK__sale__custid__40F9A68C". The conflict occurred in database "junk", table "dbo.sale", column 'custid'.The statement has been terminated.
Be One with the OptimizerTG