Mysql常见的约束有:
A. 主键
B. 外键
C. 唯一
D. 默认
对当前表employee中的添加外键如:Foreign key (deptno) referrence department(id) on update restrict on delete restrict,则以下说法正确的是。其中,employee为员工表,department为部门表。
A. employee表是子表,而department是父表
B. 外键列是deptno,参照列是id
C. 如果子表中存在对应的数据,则父表中相应的数据禁止更新
D. 如果子表中存在对应的数据,则父表中相应的数据禁止删除
对于外键约束中的外键列和参照列,如下说法是正确的。
A. 外键列与参照列数据类型必须相同
B. 外键列与参照列的名称必须相同
C. 对于数值类型,要求外键列与参照列的长度必须一致。
D. 外键列所在的表肯定是子表,参照列所在表肯定是父表。
下列语句错误的是( )
A. select * from course where remark is not null;
B. select * from course where remark<>null;
C. select * from course where remark is null;
D. select * from course where remark not is null;