Oracleラーニングノート:使用する関数と統計文
2512 ワード
SELECT type_id,COUNT(1) FROM core_tbl GROUP BY type_id;
-- 9 12
select a.* from tbl_test a where a.chk_date between to_date('2017-09-12 00:00:00','yyyy-MM-dd hh24:mi:ss') and to_date('2017-09-12 23:59:59','yyyy-MM-dd hh24:mi:ss');
select a.* from tbl_test a where to_char(a.chk_date,'yyyy-MM--dd')='2017-09-12';
select substr('abcqwedabc',1,3),substr('dsad',-3,3) from dual;
select type_name,count(type_name) from tbl_test group by type_name having count(type_name)>5;
select * from a where a.aname in (select bname from b )