Skip to main content

SqlRowIdPrivate (Class Keyword)

Specifies whether the ID column for this class is a hidden field when projected to ODBC and JDBC. Applies only to persistent classes.


To hide the ID column when projecting the table to ODBC and JDBC, use the following syntax:

Class MyApp.MyClass [ SqlRowIdPrivate ]  { //class members }

Otherwise, omit this keyword or place the word Not immediately before the keyword.


If this keyword is true, the ID column is a hidden field when the table is projected to ODBC and JDBC.

When a persistent class is projected as an SQL table, the Object Identity value for each object is projected as an SQL column — the Row ID column. The SqlRowIdPrivate keyword lets you specify whether this Row ID column should be hidden from ODBC and JDBC-based queries. If the row ID column is hidden:

  • It is not reported as a column by the various catalog queries

  • It is not included in the SELECT * query.

An ODBC or JDBC client can select this column if the query explicitly lists the column within the SELECT clause. (Note that by definition, you cannot use a Row ID column in an UPDATE or INSERT statement because the value of the Row ID cannot be modified or directly set).

Typically you use this keyword for cases where you are dealing with legacy relational data and do not want the Row ID column to be seen by reporting tools.

Effect on Subclasses

This keyword is not inherited.


If you omit this keyword, the ID column is visible normally when the table is projected to ODBC and JDBC.

See Also

FeedbackOpens in a new tab