Search Postgresql Archives

Re: How to select rows for which column has empty array ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/06/14 07:30, Arup Rakshit wrote:
> 
> How would I select rows which has empty array for the field "team_ids" ?

The shortest way is to test against an empty array constant:
  select id from reporting_groups where team_ids = '{}';

Or you can test using array_length().  Or you test against an empty
array[], cast appropriately.

HTH,
Bosco.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux