繁体   English   中英

我们可以使用 SQL 更新来更新 CLOB 列的 html 数据吗?

[英]Can we update html data of CLOB column by using SQL update?

我有 html 代码需要在一个 clob 列中更新,我如何将其转换为 sql 更新字符串? 我的第二个问题是如何插入此 html 代码中存在的 ® 和 & 。

<html>
<head>
<style></style>
</head>
<body>
     <div>
      <div align="center" style="font-size:11pt;font-family:Calibri,sans-serif;">
            <b> card<sup><font size='3'>&reg;</font></sup>  Card  Notification</b>
            <br />
        </div>
        <hr />
        <p style="font-size:11pt;font-family:Calibri,sans-serif;">
            The online statement for your  card provided by {company name} and issued by Com is now available. Select the Account Maint. &amp; Statement tab to view your statement.
        </p>
        <p style="font-size:10pt;font-family:Calibri,sans-serif;">
            Equal Opportunity Lender.
        </p>
        <p style="font-size:10pt;font-family:Calibri,sans-serif;">
            This Card is issued  International Incorporated.
        </p>
      </div>
  </body>
</html>  

一种选择是使用quotation 如果你使用sqlplus

set define off
update my table 
set my_clob_column = q'[ <html>
<head>
<style></style>
</head>
<body>
     <div>
      <div align="center" style="font-size:11pt;font-family:Calibri,sans-serif;">
            <b> card<sup><font size='3'>&reg;</font></sup>  Card  Notification</b>
            <br />
        </div>
        <hr />
        <p style="font-size:11pt;font-family:Calibri,sans-serif;">
            The online statement for your  card provided by {company name} and issued by Com is now available. Select the Account Maint. &amp; Statement tab to view your statement.
        </p>
        <p style="font-size:10pt;font-family:Calibri,sans-serif;">
            Equal Opportunity Lender.
        </p>
        <p style="font-size:10pt;font-family:Calibri,sans-serif;">
            This Card is issued  International Incorporated.
        </p>
      </div>
  </body>
</html>  ]' 
where ........... 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM