问题:
[单选] 设有学生表S(学号,姓名,性别,年龄),查询所有年龄小于等于l8岁的女同学,并按年龄进行降序排序,生成新的表WS,正确的SQL语句是( )。A . SELECT*FROM SWHERE性别=’女’ AND年龄<=18 0RDER BY 4 DESC INTOTABLE WS
B . SELECT*FROM SWHERE性别=’女’AND年龄<=18 0RDER BY 年龄INTO TABLE WS
C . SELECT*FROM SWHERE性别=’女’AND年龄<=18 0RDER BY 年龄DESC INTO TABLE WS
D . SELECT*FROM SWHERE性别=’女’0R 年龄<=18 0RDER BY ’年龄’ASC INTO TABLE WS
参考答案:A
参考解析:
A。【解析】在SQL的SELECT语句中用来排序的是ORDER BY,且可按升序(ASC)或降序(DESC)进行排列。