dbForge SQL Complete can generate an alias for each table object (table, view, stored procedure, function, synonym, sub-query) referenced in the FROM list of your SQL document automatically. To turn off automatic alias generation, uncheck the Generate alias on commit option. If there are prefixes in the names of your table objects, you can setup dbForge SQL Complete so that it ignores those prefixes when assigning aliases.
The following rules are used when creating aliases:
- If possibe, dbForge SQL Complete generates aliases using the first letter of the table object name.
- For names with underscores:
for TBL_Address alias ta is assigned
- For names with hyphens:
for Tbl-address alias a is assigned
- For names with camel case:
for TblAddress alias ta is assigned
- For names with numbers:
for 111 alias a is assigned
- If generated alias name matches the keyword then the symbol 1 is added to the end of the alias name to avoid quating of aliases. For example, if the table object name is GeneralObjects, the alias name will be go1.
- If there is ambiguity, dbForge SQL Complete creates additional aliases.
See Also