Zeb Rehman

Zeb Rehman

  • NA
  • 69
  • 53.6k

Update and Delete Constrains on same foreign key

Apr 26 2011 3:46 AM
Hello everybody, Can some body tell me how ca i apply the following two constrains on same foreign key.......

  • CASCADE ON DELETE
  • CASCADE ON UPDATE
On following table of Users

CREATE TABLE User_Type(
Type_ID int primary key,
Type_Name char(50)
);

CREATE TABLE Users(
USer_ID int primary key,
User_Name char(50),
User_Type int references User_Type(Type_ID) /*Here i want to apply those two constrains*/
);

Answers (3)