Subject | RE: [ib-support] select statement with UNION |
---|---|
Author | Thomas Steinmaurer |
Post date | 2003-04-25T17:50:44Z |
Rolf,
be faster when using the system table RDB$DATABASE, because
it contains only one record.
select LocationId, LocationName from Locations
union
select -5, Cast('(new location)' as VarChar(64)) from RDB$DATABASE
order by 2;
Regards,
Thomas Steinmaurer
http://www.iblogmanager.com
> thanks for your help. I'll useYes, because you are using UNION and not UNION ALL. It might
>
> select LocationId, LocationName from Locations
> union
> select -5, Cast('(new location)' as VarChar(64)) from Locations
> order by 2;
>
> which works fine. The second part of the union returns only one row even
> when referencing table Locations.
be faster when using the system table RDB$DATABASE, because
it contains only one record.
select LocationId, LocationName from Locations
union
select -5, Cast('(new location)' as VarChar(64)) from RDB$DATABASE
order by 2;
Regards,
Thomas Steinmaurer
http://www.iblogmanager.com