在stud表中返回年龄最小的8位同学的信息,使用()。
A: A.SELECT * FROM stud ORDER BY birthday DESC LIMIT 8;
B: B.SELECT * FROM stud ORDER BY birthday ASC LIMIT 8;
C: C.SELECT * FROM stud ORDER BY birthday ASC LIMIT 7;
D: D.SELECT * FROM stud ORDER BY birthday DESC LIMIT 7;
A: A.SELECT * FROM stud ORDER BY birthday DESC LIMIT 8;
B: B.SELECT * FROM stud ORDER BY birthday ASC LIMIT 8;
C: C.SELECT * FROM stud ORDER BY birthday ASC LIMIT 7;
D: D.SELECT * FROM stud ORDER BY birthday DESC LIMIT 7;
举一反三
- 在stud表中返回年龄最小的8位同学的信息,使用( ) A: SELECT * FROM studORDER BY birthday DESCLIMIT 8; B: SELECT * FROM studORDER BY birthday ASCLIMIT 8; C: SELECT * FROM studORDER BY birthday ASCLIMIT 7; D: SELECT * FROM studORDER BY birthday DESCLIMIT 7;
- 查询主键id从高到低排序的前10条记录的语句是() A: SELECT * FROM table ORDER BY id ASC limit 1,10 B: SELECT * FROM table ORDER id DESC limit 10 C: SELECT * FROM table ORDER BY id DESC limit 10 D: SELECT * FROM table ORDER id ASC limit 1,10
- 有学生表,其结构为: student(学号, 姓名, 性别, 年龄), 查询所有年龄小于等于18岁的女同学、并按年龄降序排序生成新的表stud,正确的SQL命令是______。 A: CREATE TABLE stud AS SELECT * FROM student WHERE 性别='女' AND 年龄<;=18 ORDER BY 年龄; B: CREATE TABLE stud AS SELECT * FROM student WHERE 性别='女' AND 年龄<;=18 ORDER BY '年龄' DESC; C: CREATE TABLE stud AS SELECT * FROM student WHERE 性别='女' AND 年龄<;=18 ORDER BY '年龄' ASC; D: CREATE TABLE stud AS SELECT * FROM student WHERE 性别='女' AND 年龄<;=18 ORDER BY 年龄 DESC;
- 有学生表,其结构为:<br/>student(学号, 姓名, 性别, 年龄),<br/>查询所有年龄小于等于18岁的女同学、并按年龄降序排序生成新的表stud,正确的SQL命令是______。 A: CREATE TABLE stud AS<br/>SELECT * FROM student WHERE 性别='女' AND 年龄<=18 ORDER BY 年龄; B: CREATE TABLE stud AS<br/>SELECT * FROM student WHERE 性别='女' AND 年龄<=18 ORDER BY '年龄' DESC; C: CREATE TABLE stud AS<br/>SELECT * FROM student WHERE 性别='女' AND 年龄<=18 ORDER BY '年龄' ASC; D: CREATE TABLE stud AS<br/>SELECT * FROM student WHERE 性别='女' AND 年龄<=18 ORDER BY 年龄 DESC;
- 在SELECT语句中,与排序有关的关键字是______。 A: ORDER BY B: LIMIT C: DESC D: ASC E: : ACD F: 、查询1997,1999年出生的同学信息,正确的SELECT语句是______。 G: SELECT * FROM student WHERE YEAR(birthday) NOT IN(1997,1999); H: SELECT * FROM student WHERE YEAR(birthday)=1997 OR YEAR(birthday)=1999; I: SELECT * FROM student WHERE YEAR(birthday) IN(1997,1999); J: SELECT * FROM student WHERE YEAR(birthday) EXISTS(1997,1999);