-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: thinkindotnet
Message 1 in Discussion


Hi friends, 
I have a self referencing table as follows. 
[SQL 2000] CREATE TABLE Tbl_Category (
Cat_ID       int          IDENTITY (1, 1) NOT NULL,
Cat_Name     varchar(50)  NULL,
Parent_ID    int          NOT NULL,
CONSTRAINT pk_Category PRIMARY KEY NONCLUSTERED (Cat_ID)
)
GO

ALTER TABLE Tbl_Category ADD CONSTRAINT RefConstCategory
    FOREIGN KEY (Parent_ID)
    REFERENCES Tbl_Category(Cat_ID)
    ON DELETE CASCADE
GO
Note that the field Parent_ID referes to field Cat_ID.
 I'm facing a problem while trying to create a ON DELETE CASCADE on the same.
 Please advice me    Thanx, Suki  

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to