📜  外键多列 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:05.782000             🧑  作者: Mango

代码示例1
CREATE TABLE Employee(
    EmployeeID int NOT NULL PRIMARY KEY,
    LastName varchar(50) NOT NULL,
    FirstName varchar(20) NOT NULL,
    Age int,
    DeptNo int,
    PRIMARY KEY (EmployeeID),
    CONSTRAINT FK_PersonOrder FOREIGN KEY (DeptNo)
    REFERENCES Department(DeptNo)
);