Re: JOIN problem
| From: | Zouari Fourat | Date: | Mon, 07 Feb 2005 19:26:21 +0000 |
| Subject: | Re: JOIN problem | ||
| References: | 1 2 3 4 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-38505@lists.php.net to get a copy of this message | ||
:( nothing
On Mon, 7 Feb 2005 14:10:10 -0500, Joseph Crawford <codebowl@gmail.com> wrote:
> try INNER JOIN?
>
>
> On Mon, 7 Feb 2005 19:47:29 +0100, Zouari Fourat <fourat@gmail.com> wrote:
> > that wont work :(
> > and either when changing RIGHT to LEFT JOIN that wont work
> >
> >
> > On Mon, 7 Feb 2005 13:41:01 -0500, Joseph Crawford <codebowl@gmail.com> wrote:
> > > try doing this
> > >
> > > SELECT a.UserName FROM table1 a RIGHT OUTER JOIN table2 b ON
> > > (a.UserName != b.username)
> > >
> > > On Mon, 7 Feb 2005 19:22:15 +0100, Zouari Fourat <fourat@gmail.com> wrote:
> > > > Hello
> > > > I have 2 tables with two columns in each one (cloned tables) like this :
> > > >
> > > > ID int(6)
> > > > UserName varchar(25)
> > > >
> > > > and i would like to select usernames from table1 that doesnt appear in table2
> > > > so i did this :
> > > >
> > > > SELECT a.UserName FROM table1 a RIGHT OUTER JOIN table2 b ON
> > > > (a.UserName = b.username)
> > > >
> > > > and that wont work, as i saw from sql joint docs, using OUTER JOIN
> > > > significate that we want to join the 2 tables where the inverse of
> > > > (a.UserName=b.username) is, so it's equivalent of
> > > > (a.UserName<>b.username) and the LEFT option is about to show the
> > > > lines from the left side table wich is a (table1) in my query
> > > >
> > > > why didnt that work fine ? how to resolve it and is my view on sql
> > > > joins is incorect ?
> > > > thanks all
> > > >
> > > > --
> > > > PHP Database Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit:
> > > > http://www.php.net/unsub.php
> > > >
> > > >
> > >
> > >
> > > --
> > > Joseph Crawford Jr.
> > > Codebowl Solutions
> > > codebowl@gmail.com
> > >
> >
>
> --
> Joseph Crawford Jr.
> Codebowl Solutions
> codebowl@gmail.com
>