SQL查询获得指定格式内容

oracle中通过修改sql语句,达到将查询的内容拼接为指定的字符串格式

eg:

select ‘<ta:datagriditem id=”‘ || lower(column_name) || ‘” key=”‘ || comments ||
‘” align=”center” dataalign=”center” width=”40″ showdetailed=”true” />’
from user_col_comments
where table_name = ‘t_wx_appointment’      —–表名一定要与数据库中一致,大小写敏感,特别是oracle中表名创建通常会被默认设置为全大写

(0)
上一篇 2022年3月22日
下一篇 2022年3月22日

相关推荐