From: | Ragnar <gnari(at)hive(dot)is> |
---|---|
To: | Ashish Ahlawat <ahlawat(dot)ashish(at)gmail(dot)com> |
Cc: | Markus Schaber <schabi(at)logix-tt(dot)com>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: join and sort on 'best match' |
Date: | 2006-12-15 19:46:47 |
Message-ID: | 1166212007.6369.194.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On fös, 2006-12-15 at 22:10 +0530, Ashish Ahlawat wrote:
>
>
> Hi team
>
> I was just asking that If table ITEM3 has all the columns then why we
> need to have a join ?? even we put a sorting very easily.
> On 12/14/06, Markus Schaber <schabi(at)logix-tt(dot)com> wrote:
> Hi, Ashish,
>
> "Ashish Ahlawat" <ahlawat(dot)ashish(at)gmail(dot)com> wrote:
>
> > if table *Item 3 : news, nature, greenpeace, whale has all
> clmn y v need
> > join ??*
it seems these where not columns of a table.
the organisation was like this:
table items:
id name
-----------
1 foo
2 bar
3 item3
table tags:
tag_id text
---------------------
1 news
2 nature
3 tennisballs
4 greenpeace
5 cannibals
6 whale
and table items_tags:
item_id tag_id
----------------
3 1
3 2
3 4
3 6
...
so table items needs to be joined to table tags via
table items_tags to retrieve the connections from item3
to news, nature, greepeace and whales.
gnari
From | Date | Subject | |
---|---|---|---|
Next Message | Aaron Bono | 2006-12-15 21:15:12 | Unions and Grouping |
Previous Message | Ashish Ahlawat | 2006-12-15 16:40:22 | Re: join and sort on 'best match' |