Re: find the number of row for each tables - Mailing list pgsql-novice

From Jesus Aneiros
Subject Re: find the number of row for each tables
Date
Msg-id Pine.LNX.4.10.10006142228050.13322-100000@jagua.cfg.sld.cu
Whole thread Raw
In response to find the number of row for each tables  (Patrick Coulombe <11h11@videotron.ca>)
List pgsql-novice
On Tue, 13 Jun 2000, Patrick Coulombe wrote:

> SELECT * from friends WHERE friends.f_id = strangers.s_id AND
> friends.categorie = 1
> ----------
> 80 rows

SELECT *
FROM friends F
WHERE friends.categorie = 1 AND EXISTS (SELECT *
                    FROM strangers
                    WHERE F.f_id = strangers.s_id);

> Can I just do 1 query and be able to find the number of row for each tables?

We have to use UNION.

Jesus.


pgsql-novice by date:

Previous
From: ghaverla@freenet.edmonton.ab.ca
Date:
Subject: Re:
Next
From: NRonayette
Date:
Subject: Re: find the number of row for each tables