getrowid()

Other. Returns the sequence number of a given row in the window.

Syntax

getrowid ( row )

Parameters

row

A row in a window.

Usage

Returns the sequence number of a given row in the window. The function takes a window ID as its argument, and the function returns the sequence number of the row in the window. This sequence number is known as the rowid, assigned uniquely as the rows get inserted.

Example

CREATE MEMORY STORE "memstore";

CREATE INPUT WINDOW iwin1 SCHEMA (a money(1), b money(3)) 
PRIMARY KEY (a) MEMORY STORE "memstore";

CREATE INPUT WINDOW iwin2 SCHEMA (a money(1), b money(3)) 
PRIMARY KEY (a) MEMORY STORE "memstore";

For these windows, getrowid (iwin1) would return 0 and getrowid (iwin2) would return 1.