Subject | Re: [firebird-support] how to join two tables |
---|---|
Author | Helen Borrie |
Post date | 2008-09-23T22:26:23Z |
At 07:54 24/09/2008, you wrote:
Simple example with matching column names and corresponding compatible data types:
select col1, col3, col5 from tableA
UNION
select col1, col3, col5 from tableB
For more details look up the Language Reference.
./heLen
>Hello, I want to have a query with some records from a table and after that,Use a UNION query:
>some records from another table. The only way I can think of doing that is with
>a stored procedure.
>
>pseudocode:
>
>for select (my fields) from table_1 into (my output vars) do
>begin
> suspend;
>end
>
>for select (my fields) from table_2 into (my output vars) do
>begin
> suspend;
>end
>
>Is there another (better) way?
>Both tables has the same field names.
Simple example with matching column names and corresponding compatible data types:
select col1, col3, col5 from tableA
UNION
select col1, col3, col5 from tableB
For more details look up the Language Reference.
./heLen