2.2. Identifiers
2.2. Identifiers 2.2.1. Identifiers SQL commands contain references to tables and columns. These references are in the form of identifiers, which uniquely identify the tables and columns in the context of the command. All queries are processed in the context of a virtual database (VDB). Because information can be federated across multiple sources, tables and columns must be scoped in some manner to avoid conflicts. This scoping is provided by schemas, which contain the information for each data source or set of views. Fully qualified table and column names are of the following form, where the separate 'parts' of the identifier are delimited by periods. TABLE: <schema_name>.<table_spec> COLUMN: <schema_name>.<table_spec>.<column_name> Syntax Rules: Identifiers can consist of alphanumeric characters, or the underscore (_) character, and must begin with an alphabetic character. Any Unicode character may be used in an identifier. Identifiers in double quotes can have any contents. The double quote character can be used if it is escaped with an additional double quote; for example, "some "" id" . Because different data sources organize tables in different ways (some prepending catalog or schema or user information) JBoss Data Virtualization allows table specification to be a dot delimited construct. Note When a table specification contains a dot, resolving will allow for the match of a partial name against any number of the end segments in the name. For example, a table with the fully qualified name vdbname."sourceschema.sourcetable" would match the partial name sourcetable . Columns, schemas, alias identifiers cannot contain a dot. Identifiers, even when quoted, are not case sensitive in JBoss Data Virtualization. Some examples of valid fully qualified table identifiers are: MySchema.Portfolios "MySchema.Portfolios" MySchema.MyCatalog.dbo.Authors Some examples of valid fully qualified column identifiers are: MySchema.Portfolios.portfolioID "MySchema.Portfolios"."portfolioID" MySchema.MyCatalog.dbo.Authors.lastName Fully qualified identifiers can always be used in SQL commands. Partial or unqualified forms can also be used, as long as the resulting names are unambiguous in the context of the command. Different forms of qualification can be mixed in the same query. 2.2.2. Reserved Words Reserved words in JBoss Data Virtualization include the standard SQL 2003 Foundation, SQL/MED, and SQL/XML reserved words, as well as JBoss Data Virtualization specific words such as BIGINTEGER, BIGDECIMAL, or MAKEDEP. See Also: Section A.2, "Reserved Keywords" Section A.4, "Reserved Keywords For Future Use"