Re: JOIN problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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@xxxxxxxxx> 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@xxxxxxxxx
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux