order by
4、order by (1)order by price //默认升序排列 (2)order by price desc //降序排列 (3)order by price asc //升序排列,与默认一样 (4)order by rand() //随机排列,效率不高 #按栏目号升序排列,每个栏目下的商品价格降序排列 select * from goods where cat_id !=2 order by cat_id,price desc;
无语言基础,自学python所做的各种笔记,欢迎大牛指点.