Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

DBMS_ROWID , 2 of 12


ROWID_CREATE Function

This function lets you create a ROWID, given the component parts as parameters.

This is useful for testing ROWID operations, because only the Oracle Server can create a valid ROWID that points to data in a database.

Syntax

DBMS_ROWID.ROWID_CREATE (
   rowid_type    IN NUMBER, 
   object_number IN NUMBER,
   relative_fno  IN NUMBER,
   block_number  IN NUMBER,
   row_number    IN NUMBER) 
  RETURN ROWID;

Pragmas

pragma RESTRICT_REFERENCES(rowid_create,WNDS,RNDS,WNPS,RNPS);

Parameters

Table 57-2 ROWID_CREATE Function Parameters
Parameter  Description 
rowid_type
 

Type (restricted or extended).

Set the rowid_type parameter to 0 for a restricted ROWID. Set it to 1 to create an extended ROWID.

If you specify rowid_type as 0, then the required object_number parameter is ignored, and ROWID_CREATE returns a restricted ROWID

object_number
 

Data object number (rowid_object_undefined for restricted). 

relative_fno
 

Relative file number. 

block_number
 

Block number in this file. 

file_number
 

File number in this block. 

Example

Create a dummy extended ROWID:

   my_rowid := DBMS_ROWID.ROWID_CREATE(1, 9999, 12, 1000, 13);


Find out what the rowid_object function returns:

   obj_number := DBMS_ROWID.ROWID_OBJECT(my_rowid);


The variable obj_number now contains 9999.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback