PostgreSQL

Поиск
Список
Период
Сортировка
Искать

PostgreSQL

От:
"Horaci Cuevas" <hcuevas@perti.com>
Дата:
Hi! 

	I'm using PostgreSQL for a search-web based database, and i saw a missing 
	function mostly found in DB2 and others, where, you can get results from
	a query having a WHERE condition to exist or not in another SQL sentence .

	In DB2 is:
	
		SELECT field1, field2 FROM tab1 WHERE field1 IN ( select field3 from tab2 )
	or
		SELECT field1, field2 FROM tab1 where field1 NOT IN ( select field3 from tab2 )

	PostgreSQL already has that, but only allows to return 1 result, ex:

		SELECT field1, field2 FROM tab1 where field1 = 
			( select field 3 from tab2 where id=1 )

	Would be great if that where added to the TODO as a future Feature.

Thanks in Advance.
Horaci Cuevas.

FAQ