[ale] Mysql joins

David Corbin david.corbin at machturtle.com
Fri Jun 9 16:52:05 EDT 2000


you want to *databases*, or tables?  In the first case, you need to
explain more.
In the second, I think I understand.  Here is a solution (in pseudo
code-diagram)

USER
====
id Number
login VARCHAR(30)
name  VARCHAR(50)

SITE
====
url VARCHAR(500)
user_id NUMBER

Then you can do this:
SELECT login,name,url from USER,SITE WHERE SITE.USER_ID=USER.ID;


Ken N wrote:
> 
> Hi,
>         There's alot of good sql people here so I thought I might ask for
> some direction before I start this thing. I want to have two databases,
> One with a username and real name and two with web sites listed. See if
> there was only one table I would have to have a repeat username and
> reallname for website the person has. See my point? So I am thinking I
> will need to join from two tables.
>         What i was wondering is how do I do set up the tables? I would
> need like a primary key or something? Hmm, if anyone has anysuggestions I
> am open to them cause I really haven't done much with SQL before.
> 
> Thanks
> Ken N
> 
> http://cleveland.lug.net/~rocket/
> 
> The answer is simple if you grant that ironies are like submarines;
> dangerous only when submerged.
> 
> --
> To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.

-- 
David Corbin 		
Mach Turtle Technologies, Inc.
http://www.machturtle.com
dcorbin at machturtle.com
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list