exists

Поиск
Список
Период
Сортировка
От Joseph Shraibman
Тема exists
Дата
Msg-id 3B81C1F4.7080508@selectacast.net
обсуждение исходный текст
Ответы Re: exists
Список pgsql-sql
I want to select a boolean if there exists a row in another table that matches this one. 
So I did select ..., (select count(*) from table2 where ...) > 0 ...
but that count(*) was taking forever.  I know there is a better way to do it, but whenever 
I try to use EXISTS I get a syntax error.  What is the proper way?

-- 
Joseph Shraibman
jks@selectacast.net
Increase signal to noise ratio.  http://www.targabot.com



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: Simple SQL-syntax
Следующее
От: Carolyn Lu Wong
Дата:
Сообщение: database location question