ORACLE/COUNT †データー件数を数える集計ファンクション テーブルの件数を数える (総数) †select count(*) from table1; データーの件数を数える (重複していないものだけ、データーの種類を数える) †select count(distinct field1) from table1; または select count(*) from ( select distinct field1 from table1); ダブっている件数を数える †テーブル table1 の、フィールド field1 のダブっている(重複している)ものと、その件数を抽出する。 select field1, cnt from ( select field1, count(*) as cnt from table1 group by field1) where cnt > 1); |