Specifying Identity column:
ALTER TABLE Menus
ADD MenuID numeric(18, 0) IDENTITY NOT NULL
Adding a Primary Key:
ALTER TABLE Orders
ADD CONSTRAINT PK_Orders PRIMARY KEY (OrderID)
Adding a Foreign Key: (Primary Key is in 'Orders' Table)
ALTER TABLE Roles_Menus
ADD FOREIGN KEY (RoleID) REFERENCES Roles(RoleID);
No comments:
Post a Comment