Oracle中數(shù)據(jù)塊中row number缺失該怎么辦,很多新手對(duì)此不是很清楚,為了幫助大家解決這個(gè)難題,下面小編將為大家詳細(xì)講解,有這方面需求的人可以來(lái)學(xué)習(xí)下,希望你能有所收獲。
創(chuàng)新互聯(lián)建站是一家專(zhuān)業(yè)提供涼山州企業(yè)網(wǎng)站建設(shè),專(zhuān)注與成都網(wǎng)站制作、網(wǎng)站設(shè)計(jì)、H5場(chǎng)景定制、小程序制作等業(yè)務(wù)。10年已為涼山州眾多企業(yè)、政府機(jī)構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專(zhuān)業(yè)網(wǎng)絡(luò)公司優(yōu)惠進(jìn)行中。
環(huán)境1:
SCOTT@proc> drop table tt purge;
Table dropped.
SCOTT@proc>
SCOTT@proc>
SCOTT@proc> create table tt (id int,name varchar2(2000)) tablespace users;
Table created.
SCOTT@proc> insert into tt values(1,rpad('a',1800,'+'));
1 row created.
SCOTT@proc> insert into tt values(2,rpad('b',1800,'+'));
1 row created.
SCOTT@proc> insert into tt values(3,rpad('c',1800,'+'));
1 row created.
SCOTT@proc> insert into tt values(4,rpad('d',1800,'+'));
1 row created.
SCOTT@proc> commit;
Commit complete.
SCOTT@proc> select id,substr(name,1,1),rowid,dbms_rowid.rowid_relative_fno(rowid) file#,dbms_rowid.rowid_block_number(rowid) block#,dbms_rowid.rowid_row_number(rowid) row# from tt;
ID SU ROWID FILE# BLOCK# ROW#
---------- -- ------------------ ---------- ---------- ----------
1 a AAAV8LAAEAAAAImAAA 4 550 0
2 b AAAV8LAAEAAAAImAAB 4 550 1
3 c AAAV8LAAEAAAAImAAC 4 550 2
4 d AAAV8LAAEAAAAImAAD 4 550 3
SCOTT@proc> delete from tt where id=2;
1 row deleted.
SCOTT@proc> commit;
Commit complete.
SCOTT@proc> insert into tt values(5,rpad('e',1800,'+'));
1 row created.
SCOTT@proc> commit;
Commit complete.
SCOTT@proc> select id,substr(name,1,1),rowid,dbms_rowid.rowid_relative_fno(rowid) file#,dbms_rowid.rowid_block_number(rowid) block#,dbms_rowid.rowid_row_number(rowid) row# from tt;
ID SU ROWID FILE# BLOCK# ROW#
---------- -- ------------------ ---------- ---------- ----------
1 a AAAV8LAAEAAAAImAAA 4 550 0
5 e AAAV8LAAEAAAAImAAB 4 550 1
3 c AAAV8LAAEAAAAImAAC 4 550 2
4 d AAAV8LAAEAAAAImAAD 4 550 3
環(huán)境2:
SCOTT@proc> drop table tt purge;
Table dropped.
SCOTT@proc> create table tt (id int,name varchar2(2000)) tablespace users;
Table created.
SCOTT@proc> insert into tt values(1,rpad('a',1800,'+'));
1 row created.
SCOTT@proc> insert into tt values(2,rpad('b',1800,'+'));
1 row created.
SCOTT@proc> insert into tt values(3,rpad('c',1800,'+'));
1 row created.
SCOTT@proc> commit;
Commit complete.
SCOTT@proc> select id,substr(name,1,1),rowid,dbms_rowid.rowid_relative_fno(rowid) file#,dbms_rowid.rowid_block_number(rowid) block#,dbms_rowid.rowid_row_number(rowid) row# from tt;
ID SU ROWID FILE# BLOCK# ROW#
---------- -- ------------------ ---------- ---------- ----------
1 a AAAV8VAAEAAAAIkAAA 4 548 0
2 b AAAV8VAAEAAAAIkAAB 4 548 1
3 c AAAV8VAAEAAAAIkAAC 4 548 2
SCOTT@proc> delete from tt where id=2;
1 row deleted.
SCOTT@proc> insert into tt values(4,rpad('d',1800,'+'));
1 row created.
SCOTT@proc> commit;
Commit complete.
SCOTT@proc> insert into tt values(5,rpad('e',1800,'+'));
1 row created.
SCOTT@proc> commit;
Commit complete.
SCOTT@proc> select id,substr(name,1,1),rowid,dbms_rowid.rowid_relative_fno(rowid) file#,dbms_rowid.rowid_block_number(rowid) block#,dbms_rowid.rowid_row_number(rowid) row# from tt;
ID SU ROWID FILE# BLOCK# ROW#
---------- -- ------------------ ---------- ---------- ----------
1 a AAAV8VAAEAAAAIkAAA 4 548 0
3 c AAAV8VAAEAAAAIkAAC 4 548 2
4 d AAAV8VAAEAAAAIkAAD 4 548 3
5 e AAAV8VAAEAAAAIkAAE 4 548 4
SCOTT@proc>
環(huán)境3:
SCOTT@proc> drop table tt purge;
Table dropped.
SCOTT@proc> create table tt (id int,name varchar2(2000)) tablespace users;
Table created.
SCOTT@proc> insert into tt values(1,rpad('a',1800,'+'));
1 row created.
SCOTT@proc> insert into tt values(2,rpad('b',1800,'+'));
1 row created.
SCOTT@proc> insert into tt values(3,rpad('c',1800,'+'));
1 row created.
SCOTT@proc> commit;
Commit complete.
SCOTT@proc> select id,substr(name,1,1),rowid,dbms_rowid.rowid_relative_fno(rowid) file#,dbms_rowid.rowid_block_number(rowid) block#,dbms_rowid.rowid_row_number(rowid) row# from tt;
ID SU ROWID FILE# BLOCK# ROW#
---------- -- ------------------ ---------- ---------- ----------
1 a AAAV8MAAEAAAAImAAA 4 550 0
2 b AAAV8MAAEAAAAImAAB 4 550 1
3 c AAAV8MAAEAAAAImAAC 4 550 2
SCOTT@proc> delete from tt where id=2;
1 row deleted.
SCOTT@proc> commit;
Commit complete.
SCOTT@proc> insert into tt values(4,rpad('d',1800,'+'));
1 row created.
SCOTT@proc> insert into tt values(5,rpad('e',1800,'+'));
1 row created.
SCOTT@proc> commit;
Commit complete.
SCOTT@proc> select id,substr(name,1,1),rowid,dbms_rowid.rowid_relative_fno(rowid) file#,dbms_rowid.rowid_block_number(rowid) block#,dbms_rowid.rowid_row_number(rowid) row# from tt;
ID SU ROWID FILE# BLOCK# ROW#
---------- -- ------------------ ---------- ---------- ----------
1 a AAAV8MAAEAAAAImAAA 4 550 0
5 e AAAV8MAAEAAAAImAAB 4 550 1
3 c AAAV8MAAEAAAAImAAC 4 550 2
4 d AAAV8MAAEAAAAImAAD 4 550 3
看完上述內(nèi)容是否對(duì)您有幫助呢?如果還想對(duì)相關(guān)知識(shí)有進(jìn)一步的了解或閱讀更多相關(guān)文章,請(qǐng)關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝您對(duì)創(chuàng)新互聯(lián)的支持。