由于Oracle varchar类型长度限制为4000 ,以下方法仅支持查询字段拼接后长度小于等于4000


第一种方法


select wm_concat(column_name)
from user_tab_cols
where table_name = upper('T1PLCBASE')--表名
--不想查询的字段名
and column_name not in ('RNWPAYTODATE', 'ANUINFORMTODATE', 'APPLYSTATUS');

第二种方法


select Listagg(column_name, ',') WITHIN GROUP(ORDER BY column_name)
from user_tab_cols
where table_name = upper('T1PLCBASE')--表名
--不想查询的字段名
and column_name not in ('RNWPAYTODATE', 'ANUINFORMTODATE', 'APPLYSTATUS');

相关文章:

  • 2021-07-01
  • 2022-12-23
  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
猜你喜欢
  • 2022-02-27
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案