join

This is a discussion on join within the MySQL Database forums, part of the Database Forums category; sorry for the "stupid" question. if I have these tables: A B 2 1 1 2 7 5 ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-31-2008
anarchix85@gmail.com
 
Posts: n/a
Default join

sorry for the "stupid" question.
if I have these tables:

A B
2 1
1 2
7 5
2 7


A JOIN B is:

2 2
7 7

or not??

thanks
Reply With Quote
  #2 (permalink)  
Old 01-31-2008
Rik Wasmus
 
Posts: n/a
Default Re: join

On Thu, 31 Jan 2008 16:25:41 +0100, <anarchix85@gmail.com> wrote:

> sorry for the "stupid" question.
> if I have these tables:
>
> A B
> 2 1
> 1 2
> 7 5
> 2 7
>
>
> A JOIN B is:
>
> 2 2
> 7 7
>
> or not??


Depends on how you join....
The way you pose it, I'd say it's rather:

2 2
1 1
7 7
2 2
--
Rik Wasmus
Reply With Quote
  #3 (permalink)  
Old 01-31-2008
Pavel Lepin
 
Posts: n/a
Default Re: join


anarchix85@gmail.com <anarchix85@gmail.com> wrote in
<071db156-69d5-4872-9987-4ff4f1a28157@e10g2000prf.googlegroups.com>:
> if I have these tables:
>
> A B
> 2 1
> 1 2
> 7 5
> 2 7
>
> A JOIN B is:
>
> 2 2
> 7 7
>
> or not??


mysql> SELECT * FROM A JOIN B;
+-------+-------+
| value | value |
+-------+-------+
| 2 | 1 |
| 1 | 1 |
| 7 | 1 |
| 2 | 1 |
| 2 | 2 |
| 1 | 2 |
| 7 | 2 |
| 2 | 2 |
| 2 | 5 |
| 1 | 5 |
| 7 | 5 |
| 2 | 5 |
| 2 | 7 |
| 1 | 7 |
| 7 | 7 |
| 2 | 7 |
+-------+-------+
16 rows in set (0.03 sec)

--
<>There is no phenotype</>
Reply With Quote
  #4 (permalink)  
Old 02-01-2008
Michael Austin
 
Posts: n/a
Default Re: join

anarchix85@gmail.com wrote:
> sorry for the "stupid" question.
> if I have these tables:
>
> A B
> 2 1
> 1 2
> 7 5
> 2 7
>
>
> A JOIN B is:
>
> 2 2
> 7 7
>
> or not??
>
> thanks



Why ask stupid questions and spend some time testing and using this new
tool on the internet called a search engine... there is an old acronym
that most people like you seem to have forgotten -- RTFreakinM...
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:50 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0