sqlserver 设置外键

CREATE TABLE Orders
(
O_Id int NOT NULL,
OrderNo int NOT NULL,
Id_P int,
PRIMARY KEY (O_Id),
FOREIGN KEY (Id_P) REFERENCES Persons(Id_P)
)
posted @ 2013-10-18 17:01  甜菜波波  阅读(1786)  评论(0编辑  收藏  举报