繁体   English   中英

包含数据数组的列的 SQL 更改表语句

[英]SQL Alter table Statement for columns containing data array

我的表的列具有以下类型的数据:列名“html_data”:

 <h2 class="blue">Safely does it</h2>
<p>Contemplating a dive off your hotel balcony into the pool? Planning to hop onto a 
<a href="http://">moped in Bali</a> y risks. Before leaping off into the abyss, check, do you have travel insurance? And if so, would you be covered for <a href="http">?</a></p>
<h2 class="green">Respect the relics</h2>

我需要一个找到href="http并将其更改为 https 的 sql 语句。

你会使用replace() ,我认为:

select replace(html_data, 'href="http:', 'href='https:')

你可以把它放在更新中:

update t
    set html_data = replace(html_data, 'href="http:', 'href='https:');

暂无
暂无

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

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