List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:August 2 2007 4:45pm
Subject:Re: Joining question
View as plain text  
Richard

 >I have table1 containing : message, senderid, reference
 >and table2 contains: senderid, name, address
 >I want to do a query that gives me : message, reference and name ...

Do you mean ...

SELECT t1.message, t1.reference, t2.name
FROM tbl1 t1
JOIN tbl2 ON t1.senderid=t2.senderid;

PB

-----

Richard wrote:
> Hello, I'm not sure if I can use union here or what syntax I should 
> use. I will simplify the tables to only include the necessary 
> information.
>
> I have table1 containing : message, senderid, reference
> and table2 contains: senderid, name, address
>
> I want to do a query that gives me : message, reference and name ...
>
> Is this possible with one query?
>
>
> Thanks !
>
> Richard
>
Thread
Joining questionRichard2 Aug
  • Re: Joining questionPeter Brawley2 Aug
Re: Joining questionPeter Brawley2 Aug
  • Re: Joining questionRichard2 Aug
    • Re: Joining questionPeter Brawley2 Aug
      • Re: Joining questionRichard2 Aug
        • Re: Joining questionPeter Brawley2 Aug
          • Re: Joining questionRichard2 Aug