Re: newton binomial coefficient

From: Mikito Harakiri <mikharakiri_at_ywho.com>
Date: Wed, 2 Apr 2003 09:28:43 -0800
Message-ID: <8bFia.4$GI5.140_at_news.oracle.com>


"Kamal" <kamal80_at_virgilio.it> wrote in message news:4e766a02.0304020146.32b9831e_at_posting.google.com...
> >
> > select t1.name, t2.name
> > from things t1, things t2
> > where t1.id < t2.id
>
> Sorry, I didn't explain very well.
>
> Here's what I obtained from your query:
>
> NAME NAME
> ------------------------------ --------
> car home
> car car
> home car

This is because the copy-and-paste error in the intput data:

insert into things values (1, 'car');
insert into things values (2, 'home');
insert into things values (3, 'car');
-----------------------------^^^^^^

It supposed to be

insert into things values (1, 'car');
insert into things values (2, 'home');
insert into things values (3, 'dog');
insert into things values (4, 'whatever');

The id column is needed only if you care about the order, otherwise, as other explained

select t1.name, t2.name
from things t1, things t2
where t1.name < t2.name

would be good enough. Received on Wed Apr 02 2003 - 19:28:43 CEST

Original text of this message