<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title>雾非雾 - REPLACE</title>
<link>https://www.941741.xyz/tag/REPLACE/</link>
<atom:link href="https://www.941741.xyz/feed/tag/REPLACE/" rel="self" type="application/rss+xml" />
<language>zh-CN</language>
<description></description>
<lastBuildDate>Wed, 19 Oct 2022 13:23:00 +0800</lastBuildDate>
<pubDate>Wed, 19 Oct 2022 13:23:00 +0800</pubDate>
<item>
<title>SQL 语句之 REPLACE 函数</title>
<link>https://www.941741.xyz/archives/86.html</link>
<guid>https://www.941741.xyz/archives/86.html</guid>
<pubDate>Wed, 19 Oct 2022 13:23:00 +0800</pubDate>
<dc:creator>花非花</dc:creator>
<category><![CDATA[应用技巧]]></category>
<description><![CDATA[昨天的命令对英文字符没问题，但遇到中文就无法处理了；请教了工程师，今天新学了个函数：SQL REPLACE 函数 语法SQL语言的 REPLACE 函数 用给定的新字符或子字符串替换原始字符串中...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>昨天的命令对英文字符没问题，但遇到中文就无法处理了；请教了工程师，今天新学了个函数：</p><p>SQL REPLACE 函数 语法<br>SQL语言的 REPLACE 函数 用给定的新字符或子字符串替换原始字符串中所有出现的这些字符。此函数还将列的值替换为新值。</p><p>语法 1：此语法使用带有 SQL 表列名的 REPLACE 函数：</p><pre><code>SELECT REPLACE(Column_Name, Character/string_to_replace, new_String/character ) AS Alias_Name FROM Table_Name;  </code></pre><p>在语法中，我们必须指定要替换其值的列的名称。</p><p>语法 2：此语法使用带有字符串的 REPLACE 函数：</p><pre><code>SELECT REPLACE(Original_String, String_to_Replace, New_String) AS Alias_Name; </code></pre><p>语法 3：此语法使用带有单个字符的 REPLACE 函数：</p><pre><code>SELECT REPLACE(Original_String, character_to_Replace, New_Character) AS Alias_Name; </code></pre><p><img src="https://www.941741.xyz/usr/uploads/2022/10/3295157523.png" alt="REPLACE" title="REPLACE"></p><pre><code>update BAK1 set BAK05 = REPLACE (BAK05 ,&#039;-作废&#039;,&#039;&#039;) where BAK17 &lt; &#039;2022-09-26 09:45:05.000&#039;</code></pre>
]]></content:encoded>
<slash:comments>1</slash:comments>
<comments>https://www.941741.xyz/archives/86.html#comments</comments>
<wfw:commentRss>https://www.941741.xyz/feed/tag/REPLACE/archives/86.html</wfw:commentRss>
</item>
</channel>
</rss>