Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
4.96 Mб

Addressing Rows Directly with the ROWID Datatype

See Also: PL/SQL Packages and Types Reference for information about the DBMS_ROWID package

The restricted ROWID pseudocolumn is returned to the client in the form of an 18-character string with a hexadecimal encoding of the datablock, row, and datafile components of the ROWID.

External Binary ROWID Some client applications use a binary form of the ROWID. For example, OCI and some precompiler applications can map the ROWID to a 3GL structure on bind or define calls. The size of the binary ROWID is the same for extended and restricted ROWIDs. The information for the extended ROWID is included in an unused field of the restricted ROWID structure.

The format of the extended binary ROWID, expressed as a C struct, is:

struct riddef {

ub4 ridobjnum; /* data obj#--this field is unused in restricted ROWIDs */

ub2 ridfilenum; ub1 filler;

ub4 ridblocknum; ub2 ridslotnum;


ROWID Migration and Compatibility Issues

For backward compatibility, the restricted form of the ROWID is still supported. These ROWIDs exist in Oracle Database version 7 data, and the extended form of the ROWID is required only in global indexes on partitioned tables. New tables always get extended ROWIDs.

See Also: Oracle Database Administrator's Guide

It is possible for a client of Oracle Database version 7 to access a more recent database, and vice versa. A client in this sense could be a remote database accessing a server using database links, or a client 3GL or 4GL application accessing a server.

See Also: PL/SQL Packages and Types Reference and Oracle Database Upgrade Guide for more information on the ROWID_TO_EXTENDED function

2-38 Oracle Database Application Developer's Guide - Fundamentals

Соседние файлы в папке Oracle 10g