ALLBASE/SQL Reference Manual (36216-90216)

258 Chapter8
Expressions
TID Function
TID Function
Used in a select list, the TID function returns the database address of a row (or rows for
BULK SELECT) of a table or an updatable view. Used in a WHERE clause, the TID function
takes a row address as input and allows direct access to a single row of a table or an
updatable view.
Scope
SQL Data Manipulation Statements
SQL Syntax
TID([ [
Owner.
]
TableName
[
Owner.
]
ViewName
CorrelationName
])
Parameters
TID is an 8 byte value representing the database address of a row of a table or
an updatable view. A TID contains these elements:
() indicates that the row address is to be obtained from the first table or view
specified (in the FROM clause of a SELECT statement or in an UPDATE
statement).
Owner
indicates the owner of the table or view.
TableName
indicates the table from which to obtain the row address.
ViewName
indicates the updatable view from which to obtain row address.
CorrelationName
indicates the correlation name of the table or view from which to
obtain the row address.
Description
The TID function can be used with user tables and updatable views and with system
base tables and system views. It cannot be used with non-updatable views (those
containing JOIN, UNION, GROUP BY, HAVING, or aggregate functions) nor on system
Table 8-2. SQLTID Data Internal Format
Content Byte Range
Always = 0 1 thru 2
File Number 3 thru 4
Page Number 5 thru 7
Slot 8