从stu表和score表中实现联合查询,查询stu表的id,name字段和score表中的courseid,score字段,两表字段id相同,成绩score大于80分,按score升序排列。
举一反三
- 以下删除stu表成绩小于60的记录,可是实现的代码是() A: delete stu where score<60; B: delete from stu where score<60; C: delete stu D: truncate stu where score<60;
- 已知有score表,将表中score字段中的值统一提高20%,写出SQL语句____
- 在SCORE表中,按成绩升序排列存入NEW表中,应使用的SQL语句是( ). A: SELECT * FROM SCORE ORDER BY 成绩 B: SELECT * FROM SCORE ORDER BY 成绩 INTO TABLE NEW C: SELECT * FROM SCORE ORDER BY 成绩 TO NEW D: SELECT * FROM SCORE ORDER BY 成绩 INTO CURSOR NEW
- 在SCORE表中,按成绩升序排列存入NEW表中,应使用的SQL语句是 A: SELECT * FROM SCORE ORDER BY 成绩 INTO NEW B: SELECT * FROM SCORE ORDER BY 成绩 INTO CURSOR NEW C: SELECT * FROM SCORE ORDER BY 成绩 INTO TABLE NEW D: SELECT * FROM SCORE ORDER BY 成绩 TO NEW
- 下列选项中,用于将 student 表按照 gender 字段进行分组查询,并且查询 score 字段值之和小于300的分组的 SQL 语句是 A: SELECT gender , SUM ( score ) FROM student GROUP BY gender HAVING SUM ( score )<;300; B: SELECT gender , SUM ( score ) FROM student GROUP BY gender WHERE SUM ( score )300; C: SELECT gender , SUM ( score ) FROM student WHERE SUM ( score )<;300 GROUP BY gender ; D: 以上语句都不对