Re: normalization review
Date: Thu, 30 Aug 2007 05:53:06 -0700
Message-ID: <1188478386.167894.136760_at_r34g2000hsd.googlegroups.com>
On 28 Aug, 00:42, "landonkelsey via DBMonster.com" <u36972_at_uwe> wrote:
> lets see what you boys know!
>
> why doesn't the following work?
>
> mysql> select * from girls full outer join boys where girls.city = boys.city;
>
> where :
>
> drop table girls;
> drop table boys;
> create table girls (name varchar(12), city varchar(12));
> create table boys (name varchar(12), city varchar(12));
> insert into girls values('Mary', 'Boston');
> insert into girls values('Nancy', null);
> insert into girls values('Susan', 'Chicago');
> insert into girls values('Betty', 'Chicago');
> insert into girls values('Anne', 'Denver');
> insert into boys values('John', 'Boston');
> insert into boys values('Henry', 'Boston');
> insert into boys values('George', null);
> insert into boys values('Sam', 'Chicago');
> insert into boys values('James', 'Dallas');
>
Is "does not work" considered to be an adequate description of a problem in your organization / place of study?
Perhaps the answer is that your query is not valid SQL (because the correct syntax is FULL OUTER JOIN ... ON). Perhaps the answer is that you omitted to declare any keys for either table.
-- David PortasReceived on Thu Aug 30 2007 - 14:53:06 CEST