Re: query from two tables & concat the result - Mailing list pgsql-general

From arnaud gaboury
Subject Re: query from two tables & concat the result
Date
Msg-id CAK1hC9v_W=CsUC3wFNkQiceGvjN5Cm5pmBgUxyonUhd8osU3WA@mail.gmail.com
Whole thread Raw
In response to Re: query from two tables & concat the result  (Raymond O'Donnell <rod@iol.ie>)
Responses Re: query from two tables & concat the result
List pgsql-general
>>
>> thetradinghall=> SELECT u.username ||'@'||d.domain as email_address
>> FROM email.mailusers u
>> INNER JOIN
>> email.domainlist d
>> ON
>> (u.domain_id=d.id);
>>
>>            email_address
>> -----------------------------------
>>  arnaud.gaboury@thetradinghall.com
>> (1 row)
>> -------------------------------------
>>
>> As for the cleaning of ID, I dropped id and changed both primary keys.
>> Thank you so much for your prompt answer and help.

In fact I kept the id for table domainlist (changed the name
accordingly your advise). If I remove the id column, I will not be
able anymore to do the above SELECT , no?
The condition (u.domain_id=d.id) will no more be possible.

Am I wrong?


>
> You're very welcome - glad to be able to help.
>
> R.
>
>
> --
> Raymond O'Donnell :: Galway :: Ireland
> rod@iol.ie



--

google.com/+arnaudgabourygabx


pgsql-general by date:

Previous
From: Raymond O'Donnell
Date:
Subject: Re: query from two tables & concat the result
Next
From: Adrian Klaver
Date:
Subject: Re: Postgres 9.5 - password for new windows user