SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
S-91
Syskeys
When you insert a record in a table stored in an entry-sequenced file or in a
key-sequenced file with a SYSKEY column, the file system automatically generates a
value for the SYSKEY column. You cannot supply the value.
When you insert a record in a table stored in a relative file, you can specify a record
number for the SYSKEY value. If you do not specify a value, the file system supplies a
record number. The SYSKEY column cannot contain a null value.
Because a SYSKEY is defined by the system when a record is inserted, an SQLCI
LOAD or SQLCI COPY of a table with a SYSKEY (or a clustering key, which uses a
SYSKEY) changes the SYSKEY value for the records in the target table. Any previous
SYSKEY values stored in other tables no longer point to the correct row after such an
SQLCI LOAD or SQLCI COPY operation. Moving a partition does not change the
SYSKEY values, although the MOVE operation includes a LOAD operation.
You cannot update values in the SYSKEY column of any table, but you can use the
SELECT statement to query SYSKEY values. If SYSKEY is provided in the value list or
for a query, the value range allowed is 0 through 4,294,963,199 (for a 4-byte SYSKEY
column).
The catalog description of a table with a SYSKEY reflects the presence of the SYSKEY
column, but SQL does not return the value of the SYSKEY column unless a query
explicitly selects that column. For example, this SELECT statement would not display
SYSKEY values:
SELECT * FROM table-name
If a view definition explicitly includes the SYSKEY column of a table, however, a
SELECT * on the view does return SYSKEY values.
You cannot partition key-sequenced tables that use SYSKEY as the primary key.
Note. A FUP RELOAD does not modify the SYSKEY value of the rows in a table.