Skip to content

Instantly share code, notes, and snippets.

@souparno
Created August 4, 2014 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save souparno/842bf4bf171c34ed1402 to your computer and use it in GitHub Desktop.
Save souparno/842bf4bf171c34ed1402 to your computer and use it in GitHub Desktop.
mysql relation
ALTER TABLE user
ADD CONSTRAINT fk_Pin
FOREIGN KEY (pin_no)
REFERENCES pin(pin_no)
ON DELETE CASCADE
ON UPDATE CASCADE
@souparno
Copy link
Author

souparno commented Aug 4, 2014

ALTER TABLE Orders
ADD FOREIGN KEY (P_Id)
REFERENCES Persons(P_Id)

@souparno
Copy link
Author

souparno commented Aug 4, 2014

ALTER TABLE Orders
DROP FOREIGN KEY fk_PerOrders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment