请为teaching数据库的student表的Email字段添加约束,规定Email字段中必须包含@且最后四个字符为小数点后面跟三个字母 ALTER TABLE student WITH NOCHECK ADD _______ CK_student_like CHECK ((Email like '________.[a-z][a-z][a-z]')
举一反三
- 创建表的语法格式有很多选项,下列能表示把sno列定义为只取9位大写英文字符的是: check sno='[A-Z][A-Z][A-Z][A-Z][A-Z][A-Z][A-Z][A-Z][A-Z]/#/sno in '[A-Z][A-Z][A-Z][A-Z][A-Z][A-Z][A-Z][A-Z][A-Z]/#/sno like '[A-Z][A-Z][A-Z][A-Z][A-Z][A-Z][A-Z][A-Z][A-Z]/#/sno='[A-Z][A-Z][A-Z][A-Z][A-Z][A-Z][A-Z][A-Z][A-Z]
- 在student表中显示所有姓马的学生的姓名、生日和Email。下列语句可以实现的( ) A: select sname,birthdate,email from student where sname like ‘马%’ B: select sname,birthdate,email from student where sname rike ‘马.*’; C: select sname,birthdate,email from student where sname like ‘%马‘ D: select sname,birthdate,email from student where sname =’*马*’
- 查询student表中的所有非空email信息, 以下语句正确的是( ) A: Select email from student where email !=null B: Select email from student where email not is null C: Select email from student where email <> null D: Select email from student where email is not null
- 若要在STUDENT表中增加一个宽度为2的“性别”字段,应使用的SQL命令为()。 A: ALTER TABLE STUDENT ADD 性别CHAR(2) B: ALTER TABLE STUDENT ADD 性别 WITH CHAR(2) C: INSERT TABLE STUDENT ADD 性别 CHAR(2) D: INSERT STUDENT ALTER ADD 性别 WITH CHAR(2)
- 在表student中增加一列address,将该列置于phone字段之后,使用语句( )。 A: ADD TABLE student(address varchar(20)); B: ADD TABLE student ALTER(address varchar(20)); C: ALTER TABLE student ADD address varchar(20); D: ALTER TABLE student ADD address varchar(20) AFTER phone;