docs.intersystems.com
Home / Class Definition Reference / Class Keywords / SqlTableName

Class Definition Reference
SqlTableName
Previous section           Next section
InterSystems: The power behind what matters   
Search:  


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


Previous section           Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-06-24 05:36:39