Subject Re: [firebird-support] Creating Synonym to a table
Author Helen Borrie
At 03:05 AM 31/12/2008, you wrote:
>I used to work with ORACLE. I was wondering if there is something
>similar to do A synonym to a table (CREATE SYNONYM ...).

No, that's an Oracle thing.

In standard SQL there is no need to have pre-constructed synonyms to refer to the same table multiple times in a query - use relation aliasing.

For example, for a self-referencing join to retrieve a tree structure:

select
a1.pk,
a1.parent_key,
a2.parent_name
from aTable a1
join aTable a2
on a2.pk = a1.parent_key

Or a correlated re-entrant subquery:

select
a1.pk,
a1.parent_key,
(select a2.parent_name from aTable a2
where a2.pk = a1.parent_key)
from aTable a1

Otherwise, try to describe what you need your synonyms for.

./heLen