ORACLE/COUNT
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
#navi(ORACLE)
*ORACLE/COUNT [#f233449d]
データー件数を数える集計ファンクション
**テーブルの件数を数える (総数) [#w714ae58]
select count(*) from table1;
**データーの件数を数える (重複していないものだけ、データ...
select count(distinct field1) from table1;
または
select count(*)
from ( select distinct field1
from table1);
**ダブっている件数を数える [#nd9af1d8]
テーブル table1 の、フィールド field1 のダブっている(重複...
select field1, cnt
from ( select field1, count(*) as cnt
from table1
group by field1)
where cnt > 1);
終了行:
#navi(ORACLE)
*ORACLE/COUNT [#f233449d]
データー件数を数える集計ファンクション
**テーブルの件数を数える (総数) [#w714ae58]
select count(*) from table1;
**データーの件数を数える (重複していないものだけ、データ...
select count(distinct field1) from table1;
または
select count(*)
from ( select distinct field1
from table1);
**ダブっている件数を数える [#nd9af1d8]
テーブル table1 の、フィールド field1 のダブっている(重複...
select field1, cnt
from ( select field1, count(*) as cnt
from table1
group by field1)
where cnt > 1);
ページ名: