Re: ANY
От | Richard Huxton |
---|---|
Тема | Re: ANY |
Дата | |
Msg-id | 46DFFFED.9010809@archonet.com обсуждение исходный текст |
Ответ на | ANY (was: Re: Alias "all fields"?) (Alban Hertroys <alban@magproductions.nl>) |
Ответы |
Re: ANY
|
Список | pgsql-general |
Alban Hertroys wrote: > > SELECT * FROM gdp WHERE NULL IS NOT ANY(y1970, y1971, y1972); > > I get nothing but syntax errors... I remember trying to use ANY in the > past and never got it to work... > > So, how do you use ANY with a fixed set of values (the way IN can)? And > can this be used to solve the OP's problem without using tricks like > summing NULL values? AFAIK there are two variants of ANY() 1. sets 2. arrays So you should be able to do: ... WHERE x = ANY( ARRAY[a, b, c] ) Of course, where x is NULL, I don't think that'll help you (x = NULL returns NULL). Oh, and you couldn't have nulls in arrays before 8.2 iirc. -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления: