oracle 的rowid是啥意思
解决方案 »
- exists 可以变换成非exists的语句吗
- request: set autotrace traceonly;response:Cannot SET AUTOTRACE ??? what is the matter?
- 关于主键重复的问题。。。
- 如何让oracle8.17在linux9下自动启动或是关闭?
- 9i,PL/SQL中本地动态SQL执行DDL语句的问题
- imp怎样重新导入数据?
- 我在delphi中用ado动态连接oracle时老报ORA-12154:TNS:无法处理服务名
- 帮忙写两个sql语句,急
- OracleManagementServer启动问题,求你帮帮我
- oracle导入数据失败
- linux下静态监听配置问题
- 关于数据字典问题
用来唯一标识一行记录。
rowid是存储每条记录的实际物理地址,对记录的访问是基于ROWID。
对数据库中记录行的作快检索方式就是使用rowid来进行查找。
select rowid,* from 表名
试一下,你就明白了
address. ROWID values contain information necessary to locate a
row: * which data block in the data file
* which row in the data block (first row is 0)
* which data file (first file is 1) In most cases, a ROWID value uniquely identifies a row in the
database. However, rows in different tables that are stored together in the same cluster can have the same ROWID. Values of the ROWID pseudocolumn have the datatype ROWID. ROWID values have several important uses: * They are the fastest means of accessing a single row.
* They can show you how a table's rows are stored.
* They are unique identifiers for rows in a table. A ROWID does not change during the lifetime of its row. However, you should not use ROWID as a table's primary key. If you delete
and reinsert a row with the Import and Export utilities, for
example, its ROWID may change. If you delete a row, Oracle may
reassign its ROWID to a new row inserted later. Although you can use the ROWID pseudocolumn in the SELECT and WHERE
clauses of a query, these pseudocolumn values are not actually
stored in the database. You cannot insert, update, or delete a value of the ROWID pseudocolumn. EXAMPLE: This statement selects the address of all rows that contain data for
employees in department 20: SELECT ROWID, ename
FROM emp
WHERE deptno = 20 ROWID ENAME
----------------- ----------
0000000F.0000.0002 SMITH
0000000F.0003.0002 JONES
0000000F.0007.0002 SCOTT 0000000F.000A.0002 ADAMS
0000000F.000C.0002 FORD
stored in the table. You can select from pseudocolumns, but you
cannot insert, update, or delete their values. This section
describes these pseudocolumns: * CURRVAL
* NEXTVAL
* LEVEL
* ROWID
* ROWNUM