- 最后登录
- 2014-9-10
- 在线时间
- 34 小时
- 威望
- 62
- 金钱
- 508
- 注册时间
- 2012-1-30
- 阅读权限
- 50
- 帖子
- 53
- 精华
- 1
- 积分
- 62
- UID
- 187
|
8#
发表于 2013-8-12 11:58:05
执行下下面的语句,想看下结果
SELECT A.TABLE_NAME, A.COLUMN_NAME, A.NUM_DISTINCT, B.NUM_ROWS, A.NUM_NULLS,
A.DENSITY, A.LOW_VALUE, A.HIGH_VALUE, A.NUM_BUCKETS, A.HISTOGRAM,
A.LAST_ANALYZED, A.SAMPLE_SIZE
FROM DBA_TAB_COL_STATISTICS A, DBA_TABLES B
WHERE A.OWNER = B.OWNER
AND A.TABLE_NAME = B.TABLE_NAME
AND A.OWNER = 'SCOTT'
AND A.TABLE_NAME = UPPER('TT')
AND A.COLUMN_NAME = UPPER('OWNER')
ORDER BY A.HISTOGRAM;
SELECT A.ENDPOINT_NUMBER, TO_CHAR(A.ENDPOINT_VALUE), A.ENDPOINT_ACTUAL_VALUE
FROM DBA_HISTOGRAMS A
WHERE A.TABLE_NAME = UPPER('TT')
AND A.OWNER = 'SCOTT'
AND A.COLUMN_NAME = UPPER('OWNER')
ORDER BY A.ENDPOINT_NUMBER;
SELECT OWNER,COUNT(1) FROM SCOTT.TT GROUP BY OWNER; |
|