March 5, 2002 at 9:57 am
I set up triggers so that if I delete from the PK table the FK would delete and it is not working. Am I missing something? Please let me know.
Ayisat Idris
Ayisat Idris
March 5, 2002 at 10:34 am
If this is SQL 7 I believe you have to delete from the FK table then from the main table for it to work.
If SQL 2000 there is an option when viewing the relationships to CASCADE DELETES and UPDATES that you can turn on.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
March 5, 2002 at 1:27 pm
I'm using SQL 2000 and I have yet to find this option. Please let me know where I can find that.
quote:
If this is SQL 7 I believe you have to delete from the FK table then from the main table for it to work.If SQL 2000 there is an option when viewing the relationships to CASCADE DELETES and UPDATES that you can turn on.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Ayisat Idris
Ayisat Idris
March 5, 2002 at 1:35 pm
Open Enterprise Manager and Expand and open you database in question. Open the Tables list and right click the table with the relation ship choosing design. On the table design child screen right click and choose relationships or properties and relationships tab on the dialog that appears. There you will find it at the bootm of this dialog. I don't have a 2000 server here but you can do the SQL statements as well which if noone post I will tomorrow when I have one available.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
March 5, 2002 at 1:37 pm
In Books Online, under CREATE TABLE or ALTER TABLE. Here are some links:
CREATE TABLE:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_create2_8g9x.asp
ALTER TABLE:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_aa-az_3ied.asp
K. Brian Kelley
http://www.sqlservercentral.com/columnists/bkelley/
K. Brian Kelley
@kbriankelley
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply