2017-09-03 47 views

回答

0

您可以使用檢查約束:

CREATE TABLE Persons (
    ID int NOT NULL, 
    LastName varchar(255) NOT NULL, 
    FirstName varchar(255), 
    DegreeLevel varchar(30) CHECK (DegreeLevel IN ('Msc.', 'Phd.', 'Without studies')) 
); 

請看: https://www.w3schools.com/sql/sql_check.asp