// 查询某字段为某个值的记录
select * from sales where type = '皮夹子'
// 模糊查询
select * from sys_users where name like '%吴%'
// 去重查询
select distinct type_name, table_name from menuTab;
// 查询前10条
select * caseTab where rownum < 10;
// 统计某一字段不同数值数量
select count(distinct(caseType)) from caseTab;
// 统计某个字段不同数值的各自数量
select caseType, count(1) from caseTab group by caseType;
// 左join
select * from caseTab a left join caseTypeTab b on a.id = b.id where caseDt between to_date('2020-07-01 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2020-07-31 00:00:00','yyyy-mm-dd hh24:mi:ss')
// 右join
// 与左join类似,不同在于左join保留左侧表的所有记录,即使没有匹配on中条件的项 ***注意,此处条件指的是on后面的 // 而右join保留右侧的表的记录