【发布时间】:2019-10-09 22:02:40
【问题描述】:
我只想知道关键字检查后的符号是做什么的??
例子:
create table DistancesTbl(
from varchar(100) not null,
to varchar(100) not null,
km smallint not null,
primary key(from, to),
constraint check_from_to check (from <> to),
constraint check_distance check (km > 0)
);
在上一个查询中,该行是什么 约束 check_from_to 检查(从 到), 具体怎么做?
谢谢!
【问题讨论】:
标签: mysql constraints ddl