Re: find the number of row for each tables

Поиск
Список
Период
Сортировка
От Jesus Aneiros
Тема Re: find the number of row for each tables
Дата
Msg-id Pine.LNX.4.10.10006142228050.13322-100000@jagua.cfg.sld.cu
обсуждение исходный текст
Ответ на find the number of row for each tables  (Patrick Coulombe <11h11@videotron.ca>)
Список 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 по дате отправления:

Предыдущее
От: ghaverla@freenet.edmonton.ab.ca
Дата:
Сообщение: Re:
Следующее
От: NRonayette
Дата:
Сообщение: Re: find the number of row for each tables