select * from company where company_code in ('103','001') select * from company where company_code = any(array['103','001']) select * from company where company_code = any( regexp_split_to_array('103,001', ',') ) -- very neat, no need to to split string to array, can cast string directly to array, as long there's curly bracket inside select * from company where company_code = any('{103,001}'::text[])
"Simplicity can't be bought later, it must be earned from the start" -- DB
Friday, July 23, 2010
Postgres array
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment