返回数说广场
1
在Oracle数据库中,通过create table t as select * from dba_objects;语句创建T表,同时通过create index idx_t_object_id on t(object_id) 创建索引,T表的object_id可以为NULL。请问以下哪些SQL语句会利用到索引返回记录?ABCEF
A.select avg(object_id) from t ;
B.select count(*) from t where object_id is not null;
C.select count(object_id) from t where object_id is not null;
D.select count(*) from t;
E.select avg(object_id) from t where object_id is not null;
F.select count(object_id) from t;
1、由于NULL值不参与运算,所以count(object_id)、avg(object_id) 可以利用索引返回结果;
2、B树索引不存储NULL值,所以select count(*) from 无法利用索引返回结果;
0
1 155
分享
评论
热门数说



