Go Back   Rhinocerus > Newsgroup > Newsgroup comp.databases.mysql

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 11-24-2009, 11:43 PM
SQL newbie
Guest
 
Posts: n/a
Default Full outer join?

I have used ms sql server 2008 express in school. I am new to sql.

I have practiced using some of these joins from this example url here:

http://www.codeproject.com/KB/databa...SQL_Joins.aspx
One of the joins i used was->


SELECT *
FROM Table_A as A
full outer Table_B as B
ON A.PKey = B.PKey
where A.PKey IS NULL OR B.Pkey IS NULL;

Given i moved to windows 7 i was not able to get ms sql on my machine
so i decided to use mysql.

But i got a syntax error and find the key word full is not allowed...?
According to mysql syntax in the url below, its not present....

http://dev.mysql.com/doc/refman/5.0/en/join.html

So the question is, can i still do a full join in mysql but with
different sql from what i gave above?


Here is the code i used:

TABLE_A
PKey Value
---- ----------
1 FOX
2 COP
3 TAXI
6 WASHINGTON
7 DELL
5 ARIZONA
4 LINCOLN
10 LUCENT

create table table_a
(
PKey int(5),
value varchar(20)
);

insert sampledb.table_a(PKey, value)
value(1, "fox");
insert sampledb.table_a(PKey, value)
value(2, "cop");
insert sampledb.table_a(PKey, value)
value(3, "taxi");
insert sampledb.table_a(PKey, value)
value(6, "washington");
insert sampledb.table_a(PKey, value)
value(7, "dell");
insert sampledb.table_a(PKey, value)
value(5, "arizona");
insert sampledb.table_a(PKey, value)
value(4, "lincoln");
insert sampledb.table_a(PKey, value)
value(10, "lucent");




TABLE_B
PKey Value
---- ----------
1 TROT
2 CAR
3 CAB
6 MONUMENT
7 PC
8 MICROSOFT
9 APPLE
11 SCOTCH

create table table_b
(
PKey int(5),
value varchar(20)
);

insert sampledb.table_b(PKey, value)
value(1, "trot");
insert sampledb.table_b(PKey, value)
value(2, "car");
insert sampledb.table_b(PKey, value)
value(3, "cab");
insert sampledb.table_b(PKey, value)
value(6, "monument");
insert sampledb.table_b(PKey, value)
value(7, "pc");
insert sampledb.table_b(PKey, value)
value(5, "microsoft");
insert sampledb.table_b(PKey, value)
value(4, "apple");
insert sampledb.table_b(PKey, value)
value(10, "scotch");
Andrew
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

Reply

Popular Tags in the Forum
join, outer

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
performance issue after upgrade to oracle 11.2.0.1 linux 32 bit. lsllcm Newsgroup comp.databases.oracle.server 31 11-20-2009 01:24 PM
Re: performance issue after upgrade to oracle 11.2.0.1 linux 32 bit. lsllcm Newsgroup comp.databases.oracle.server 0 11-04-2009 11:03 AM
Cannot create Full Outer Join mlt Newsgroup comp.databases.mysql 7 07-11-2009 05:07 PM
Query Performance Eric Newsgroup comp.databases.ms-sqlserver 7 04-29-2009 07:39 AM
Re: Outer join using SAS datastep Crawford, Peter1 Newsgroup comp.soft-sys.sas 0 09-06-2005 02:34 PM



All times are GMT. The time now is 06:52 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.