Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see How to Migrate to InterSystems IRIS, available on the WRC Distributions page (login required).

SqlTableName

Specifies the name of the SQL table to which this class is projected. Applies only to persistent classes.

Usage

To override the default name of the SQL table to which this class is projected, use the following syntax:

Class MyApp.Person Extends %Persistent [ SqlTableName = DBTable ]  { //class members }

Where DBTable is a valid SQL identifier.

Details

This keyword specifies the name of the SQL table to which this class is projected. By default, the SQL table name is the same as the class name.

Typically you use this keyword when the class name is a SQL reserved word (not uncommon) or if you want the SQL table to contain characters not supported by class names (such as the “_” character).

Effect on Subclasses

This keyword is not inherited.

Default

If you omit this keyword, the class name is used as the SQL table name.

See Also

Feedback