<pre name="code" class="sql">SQL> create table test as select * from dba_objects;
Table created.
select * from test where object_id=10 and OWNER='SYS';
SQL> select count(*) from test where object_id=10;
COUNT(*)
----------
1
SQL> select count(*) from test;
COUNT(*)
----------
74443
模拟插入object_id=10 and OWNER='SYS'的记录
SQL> select object_id,owner,count(*) from test2 group by object_id,owner having object_id=10;
OBJECT_ID OWNER COUNT(*)
---------- ------------------------------ ----------
10 TEST 72636
10 SYS 10003
SQL> select count(*) from test2;
COUNT(*)
----------
1578831
SQL> create index test2_id
TABLE ACCESS BY INDEX ROWID前面的星号
最新推荐文章于 2024-10-16 14:00:00 发布