1. Values for the staffid attribute should be a string of exactly 4 characters, and should start with
letter ‘s’.2. Values for the sid attribute of the Student relation should be a string of exactly 4 characters, and
should start with letter ‘u’.3. Values for the title attribute should be one of the following strings: “Lecturer”, “Senior
Lecturer”, “Associate Professor” and “Professor”.4. Values for the credits attribute should be integers between 0 and 6.5. Values for the sex attribute should be either ‘M’ (for male) or ‘F’ (for female). NULL values are not
allowed.
letter ‘s’.2. Values for the sid attribute of the Student relation should be a string of exactly 4 characters, and
should start with letter ‘u’.3. Values for the title attribute should be one of the following strings: “Lecturer”, “Senior
Lecturer”, “Associate Professor” and “Professor”.4. Values for the credits attribute should be integers between 0 and 6.5. Values for the sex attribute should be either ‘M’ (for male) or ‘F’ (for female). NULL values are not
allowed.
解决方案 »
- 请问MFC编程如果通过SSH对虚拟机上的MySql进行访问?
- 服务器上的 数据库mysql InnoDB类型的 全打不开了
- 求一段代码或存储过程把库名改为大写
- 触发器问题,如何找出所有更新过的字段
- The used SELECT statements have a different number of columns
- 小问题
- 关于MySQL4.1系列版本采用的密码加密方法跟PHP自带客户端不一样
- 求一select语句!!(百分)
- C语言中用mysql_real_query调用source命令通过.sql导入建表信息的问题
- 各位大神请帮忙下载几个mysql安全漏洞补丁
- 用codeblocks连接mysql问题
- 还是那两个游标
letter ‘s’.in other database, you can use the CHECK to enforce the data comply with the rule, but MySQL does not support CHECK ! in MySQL it can be done in the Trigger
2. Values for the sid attribute of the Student relation should be a string of exactly 4 characters, and
should start with letter ‘u’.same like Question 1
3. Values for the title attribute should be one of the following strings: “Lecturer”, “Senior
Lecturer”, “Associate Professor” and “Professor”.in MySQL, you can use the ENUM , for example
CREATE TABLE sizes (
name ENUM('small', 'medium', 'large')
);
4. Values for the credits attribute should be integers between 0 and 6.same like Question 1
5. Values for the sex attribute should be either ‘M’ (for male) or ‘F’ (for female). NULL values are not
allowed.same like question 3
CREATE TABLE sizes (
sex ENUM('small', 'medium', 'large') not null
);
add constraint CK_Student check (sex IN(‘M','F'))
PostgreSQL 8.1 中文文档