示例:

select  'select a.xh,a.dj,a.xzb from xsjbxxb a where a.xzb=' || chr(39)  ||   a.xzb ||  chr(39)  ||   ' order by dj desc for update;'
from   xsjbxxb a

 

结果:

select a.xh,a.dj,a.xzb from xsjbxxb a where a.xzb='机191' order by dj desc for update;
select a.xh,a.dj,a.xzb from xsjbxxb a where a.xzb='自动化类195' order by dj desc for update;
select a.xh,a.dj,a.xzb from xsjbxxb a where a.xzb='印191' order by dj desc for update;

 

说明:

要显示的字符串用一对单引号表示

连接字符串的运算符是 ||

chr(39)表示单引号

 

相关文章:

  • 2022-01-15
  • 2022-02-16
  • 2022-01-04
  • 2022-02-09
  • 2021-12-13
  • 2022-12-23
  • 2022-01-21
  • 2021-10-06
猜你喜欢
  • 2022-12-23
  • 2021-10-24
  • 2022-01-28
  • 2021-12-15
  • 2022-01-20
  • 2022-02-11
  • 2021-06-10
相关资源
相似解决方案