摘要: 排序 order by 默认正序 asc 倒序 desc每个字段右上角 单击可以排序(正序倒序都可以) -- 按一个字段的排序 默认正序select * from emp e order by e.sal;-- 加上正序关键字也是可以的select * from emp e order by e.s 阅读全文
posted @ 2022-03-01 18:23 oNice 阅读(169) 评论(0) 推荐(0) 编辑
摘要: -- 删除表drop table -- 建表create table -- 表注释comment on table ... is ...-- 字段注释comment on column ... is ... -- 查询select * from -- 增加insert into ... values 阅读全文
posted @ 2022-03-01 18:15 oNice 阅读(18) 评论(0) 推荐(0) 编辑
摘要: -- 语法 select * |列名|表达式 -- 5 from 表名 -- 1 where 条件 -- 2 group by 列名 -- 3having 条件 -- 4 order by 列名 [asc/desc] -- 6 报错 不是group by表达式查询字段跟分组字段不一致分组字段要与查询 阅读全文
posted @ 2022-03-01 18:06 oNice 阅读(274) 评论(0) 推荐(1) 编辑