pg数据库字符串切割使用案例

select unnest(string_to_array('1,2,3',','))::int2;

select regexp_split_to_table('1,2,3,4',',')::int2;

使用案例
select 1 from  [table] where state in (select regexp_split_to_table(@state_str,',')::int2 )

posted @ 2024-02-19 16:06  zcany  阅读(147)  评论(0)    收藏  举报