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<bedoug...@earthlink.net> 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=mart...@crystal-labs.nl
>
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to