List:General Discussion« Previous MessageNext Message »
From:Martijn Engler Date:June 15 2009 10:35am
Subject:Re: query question...
View as plain text  
It sounds to me like you want to join the two tables?
http://dev.mysql.com/doc/refman/5.1/en/join.html

On Mon, Jun 15, 2009 at 03:56, bruce<bedouglas@stripped> wrote:
> hi.
>
> i've got a situation, where i'm trying to figure out how to select an item
> from tblA that may/maynot be in tblB.
>
> if the item is only in tblA, i can easilty get a list of the items
>  select * from tblA
>
> if the item is in tblA but not linked to tblB, i can get the items as well
>  select * from tblA where id not in (select id from tblB);
>
> but i have no idea how to combine the two selects..
>
> i need to combine them, as the app can create tblA for a given item, and
> then later on create the data in tblB, with thblA.id = tblB.aid.
>
> thoughts/pointers on this would be appreciated.
>
> thanks!
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>
Thread
query question...bruce15 Jun
  • Re: query question...Martijn Engler15 Jun
  • Re: query question...Shawn Green15 Jun