Hi,
Some ways to do that:
http://www.sql-ex.ru/help/select16.php
> Hi list,
> I have two table that are so represented:
> t1:
> id int primary key
> ... other
> t2:
> id int primary key
> t1id int fk(t1.id)
> somedate date
> ... other
> data t1:
> 1 | abcde
> 2 | fghi
> data t2:
> 1 | 1 | 2010-05-
In article <4bfd5bc0.90...@unipex.it>,
Michele Petrazzo - Unipex writes:
> Hi list,
> I have two table that are so represented:
> t1:
> id int primary key
> ... other
> t2:
> id int primary key
> t1id int fk(t1.id)
> somedate date
> ... other
> data t1:
> 1 | abcde
> 2 | fghi
> data t2:
> 1 |
person already replied a solution without an extra table.
Give that a try, too !!!
-Original Message-
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On
Behalf Of Michele Petrazzo - Unipex
Sent: Wednesday, May 26, 2010 1:35 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] inn
Michele Petrazzo - Unipex wrote:
> I have two table that are so represented:
> t1:
> id int primary key
> ... other
> t2:
> id int primary key
> t1id int fk(t1.id)
> somedate date
> ... other
> data t1:
> 1 | abcde
> 2 | fghi
> data t2:
> 1 | 1 | 2010-05-23
> 2 | 1 | 2010-05-24
> 3 | 1 | 2010-
-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org]
On Behalf Of Michele Petrazzo - Unipex
Sent: Wednesday, May 26, 2010 7:35 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] inner join and limit
Hi list,
I have two table that are so represented:
t1:
id int primary key
... other
t2:
id
e-
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On
Behalf Of Michele Petrazzo - Unipex
Sent: Wednesday, May 26, 2010 1:35 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] inner join and limit
Hi list,
I have two table that are so represented:
t1:
id int primary key
Hi list,
I have two table that are so represented:
t1:
id int primary key
... other
t2:
id int primary key
t1id int fk(t1.id)
somedate date
... other
data t1:
1 | abcde
2 | fghi
data t2:
1 | 1 | 2010-05-23
2 | 1 | 2010-05-24
3 | 1 | 2010-05-25
4 | 2 | 2010-05-22
5 | 2 | 2010-05-26
I'm trying t