Table names

<< Click to Display Table of Contents >>

Navigation:  Local SQL > Overview > Conventions >

Table names

Previous pageReturn to chapter overviewNext page
hmtoggle_plus1See also

ANSI-standard SQL confines each table name to a single word comprised of alphanumeric characters and the underscore symbol, "_". Local SQL, however, is enhanced to support the Paradox and dBASE feature of non-alpha characters and spaces embedded in table names. To use table names with these embedded characters, you must enclose the table name in quotation marks (double or single).

SELECT *

FROM "Customer Revenue.db";

Local SQL supports full file and path specifications in table references. Table references with path or filename extensions must be enclosed in single or double quotation marks. For example:

SELECT *

FROM 'Parts.dbf';

SELECT *

FROM "c:\sample\parts.dbf";

Local SQL also supports BDE aliases in table references. To do this, enclose the BDE alias in colons, prefix the table name with that colon-enclosed alias name, and then enclose the whole reference in quotation marks. For example:

SELECT *

FROM ":DBDEMOS:Customer.db";

If you omit the file extension for a local table name, the table is assumed to be the table type specified in the BDE configuration. The default table type is specified either in the default driver setting or in the default driver type for the standard alias associated with the query.

Finally, local SQL permits table names to duplicate SQL keywords as long as those table names are enclosed in single or double quotation marks. For example:

SELECT Passid

FROM "Password"