Hi All,

I have a db (MSSQL) with the following tables:

Position         Questions     Response
position_id  question_id   response_id
             position_id   question_id

I need to design the triggers that will automatically delete related records
from the question and responses table.

I thought my triggers should look like:

CREATE TRIGGER trig_Delete ON position
FOR DELETE
AS
DELETE
FROM question
WHERE position_id = deleted.position_id

CREATE TRIGGER trig_Delete ON question
FOR DELETE
AS
DELETE
FROM resume_applications
WHERE question_id = deleted.question_id


Can anyone help me out on the correct syntax here?

Thanks,
Duane

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to