举一反三
- 已知表xk(sno,cno,grade),创建规则,限定grade的范围在0-100之间,其正确语句为( ) A: create rule gradeRuleas @grade between 0 and 100 B: create gradeRuleas @grade between 0 and 100 C: create rule gradeRuleas grade between 0 and 100 D: create gradeRuleas grade between 0 and 100
- 在“学生-课程”数据库中,当定义SC表时对字段Grade进行约束:Grade SMALLINT CHECK (Grade>=0 AND Grade<=100),如果SC表中原有记录('201215121','7',92),那么当执行"UPDATE SC SET Grade=Grade+10"时,数据库和DBMS将___________。 A: SC表数据不变,DBMS报错不允许更新 B: 记录('201215121','7',92)更新为('201215121','7',100),DBMS提醒Grade值不能超过100 C: 记录('201215121','7',92)更新为('201215121','7',NULL),DBMS提醒Grade值不能超过100 D: SC表数据不变,DBMS显示语句语法正确
- “把查询sc表和更新sc表的grade列的权限受予用户user1”的正确SQL语句是()。 A: GRANT SELECT, UPDATE(gradON TABLE sc TO user1 B: GRANT SELECT sc, UPDATE sc, grade TO user1 C: GRANT SELECT, UPDATE ON TABLE s grade TO user1 D: GRANT SELECT ON TABLE sc, UPDATE ON TABLE sc(grad TO user1
- “把查询SC表和更新SC表的grade列的权限授予用户user”的正确SQL语句是( )。 A: GRANT SELECT sc.UPDATE sc.grade TO user B: GRANT SELECT,UPDATE(grade)ON TABLE sc TO user C: GRANT SELECT,UPDATE ON TABLE sc.grade TO user D: GRANT SELECT ON TABLE sc,UPDATE ON TABLE sc(grade)TO user
- 下面选项中,能够更新表student中id值小于4的SQL语句是() A: ALTER TABLE student where id<4; B: UPDATE student set grade=100 where id<4; C: UPDATE student set grade=100 where id<=4; D: UPDATE Table student set grade=100 where id<4;
内容
- 0
在SQLSERVER中,授权用户ZHAO获得更新选修表(SC)中“成绩”(GRADE)属性的SQL语句是()。 A: grantgradeonsctozhao B: grantupdateonsctozhao C: grantupdate(grade)onsctozhao D: grantupdateonsc(grade)tozhao E: grantupdate(grade)onscfromzhao
- 1
设有关系SC(sno, cname, grade),各属性的含义分别为学号、课程名、成绩。若要将所有学生的“数据库系统”课程的成绩增加5%,能正确完成该操作的SQL语句是( )。 A: UPDATE SET SC grade = grade*1.05 WHERE cname= '数据库系统' B: UPDATE SC SET grade = grade*0.05 WHERE cname= '数据库系统' C: UPDATE SC grade = grade+5 WHERE cname= '数据库系统' D: UPDATE SC SET grade = grade*1.05 WHERE cname= '数据库系统'
- 2
若查询考试成绩不为空的学生的学号,下列语句哪个是正确的?( ) A: SELECT Sno FROM SC WHERE Grade >= 0; B: SELECT Sno FROM SC WHERE Grade != 0; C: SELECT Sno FROM SC WHERE Grade IS NOT NULL; D: SELECT Sno FROM SC WHERE Grade NOT IS NULL;
- 3
若查询考试成绩不为空的学生的学号,下列语句哪个是正确的? A: SELECT Sno FROM SC WHERE Grade >= 0; B: SELECT Sno FROM SC WHERE Grade!= 0; C: SELECT Sno FROM SC WHERE Grade NOT IS NULL; D: SELECT Sno FROM SC WHERE Grade IS NOT NULL;
- 4
下列选项中,用于将student 表中“grade " 字段的值修改为“80”的SQL 语句是( )。 A: ALTER TABLE student set grade=80; B: ALTER student set grade=80; C: UPDATE student set grade=80 where grade<;80; D: UPDATE student set grade=80;