Sybernet / Supplied Functions Reference
Release 3.00
Oct 14, 2002
backwards forwards

HTTP.GET_IDENTITY

This function gets (and updates) the next identity value for a table.

Syntax

FUNCTION GET_IDENTITY
(
    OWNER                         VARCHAR2
,   TABLE_NAME                    VARCHAR2
,   COLUMN_NAME                   VARCHAR2
)
RETURN NUMBER;

Parameters

Parameter Description
owner
 
The owner of this table.
table_name
 
The name of this table.
column_name
 
The name of the identity column.

Returns

The next identity value.

Example 1

The following example illustrates how to call get_identity:

CREATE OR REPLACE TRIGGER CRON_TRIGGER
BEFORE INSERT ON CRON
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE ROW_ID CRON.ROW_ID%TYPE;
BEGIN
    :NEW.ROW_ID:=HTTP.GET_IDENTITY(USER,'CRON','ROW_ID');
    RETURN;
END;

Example 2

The following example illustrates how to seed this function:

DECLARE seed NUMBER(12);
BEGIN
seed:=HTTP.GET_IDENTITY('DELTEK','PROJ','PROJ_ID');
END;



Sybernet is a trademark of SRI International.
Copyright © 1996-2008 SRI International. All Rights Reserved.
Denis D. Workman / http://Sybernet.sri.com/