举一反三
内容
- 0
对“职工”表所有的职工按性别升序,使用的SQL语句是( )。 A: SELECT * FROM 职工 ORDER BY 性别 ASC B: SELECT * FROM 职工 ORDER BY 性别 DESC C: SELECT * FROM 职工 GROUP BY 性别 D: SELECT * FROM 职工 GROUP BY 性别 DESC
- 1
下面在sh_goods表中根据cat_id升序排序,当cat_id相同时按price降序排序的语句是()。 A: SELECT * FROM sh_goods ORDER BY price DESC,cat_id; B: SELECT * FROM sh_goods ORDER BY price ,cat_id; C: SELECT * FROM sh_goods ORDER BY cat_id DESC,price; D: SELECT * FROM sh_goods ORDER BY cat_id,price DESC;
- 2
SELECT语句中的子句ORDER BY用于指定字段进行排序。ASC表示升序;DESC表示降序。其中 是默认值。
- 3
下面在sh_goods表中根据cat_id升序排序,并对每个cat_id按price降序排序的语句是( )。[br][/br](1.0) A: SELECT * FROM sh_goods ORDER BY price DESC,cat_id; B: SELECT * FROM sh_goods ORDER BY cat_id,price DESC; C: SELECT * FROM sh_goods ORDER BY price ,cat_id; D: SELECT * FROM sh_goods ORDER BY cat_id DESC,price;
- 4
SELECT语句中,若希望将查询结果排序,则应在SELECT语句中使用ORDER BY子句,( )选项表示降序 A: DESC B: ASC C: % D: _(下划线)