[ CONSTRINT 約束 _ name ]
{ CHECK (Expression)[ NO INHERIT ] |
UNIQUE (column _ name [ ,... ]) index _ properties |
PRIMARYKEY (column _ name [ ,... ]) index _ properties |
内联列定义的示例语法(这里是 SQLServer) :
CREATE TABLE tab(
id INT PRIMARY KEY, -- constraint
c INT INDEX filtered (c) WHERE c > 10, -- filtered index
b VARCHAR(10) NOT NULL INDEX idx_tab_b, -- index on column
d VARCHAR(20) NOT NULL,
INDEX my_index NONCLUSTERED(d) -- index on column as separate entry
);