将多行记录转化为一个字符串,用array_to_string内置函数即可!

select array_to_string(array(

    select distinct name from tab where 1=1

),'-->') as strs;

将一个字符串转化为多行记录,用regexp_splite_to_table即可!

select regexp_splite_to_table('asd,qwe,qeq,ere,fds,ert',',') as id;

分割之后再转化为整数

select cast( regexp_splite_to_table('1,2,3,4,5,6',',') as integer) as id;

相关文章:

  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
  • 2021-05-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-22
  • 2021-05-27
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
相关资源
相似解决方案