forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
40 lines
4.2 KiB
HTML
40 lines
4.2 KiB
HTML
<a name="EN-US_TOPIC_0000001772536548"></a><a name="EN-US_TOPIC_0000001772536548"></a>
|
|
|
|
<h1 class="topictitle1">Quotation Marks</h1>
|
|
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_section752466121414"><h4 class="sectiontitle">Single Quotation Mark (')</h4><p id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_p158801999144">Aliases in MySQL contain single quotation marks, which are not supported by GaussDB(DWS). DSC changes them to double quotation marks during migration.</p>
|
|
<p id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_p1280102618184"><strong id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_b238119019192">Input</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_screen7749196101918">select name as 'mingzi' from t1;</pre>
|
|
<p id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_p14621654141819"><strong id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_b1984412291913">Output</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_screen119451098196">SELECT
|
|
name AS "mingzi"
|
|
FROM
|
|
t1;</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_section710162611417"><h4 class="sectiontitle">Backquote (`)</h4><p id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_p8971173011416">Aliases and column names in MySQL contain backquotes, which are not supported by GaussDB(DWS). DSC changes them to double quotation marks during migration.</p>
|
|
<p id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_p1095118155231"><strong id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_b12680142411231">Input</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_screen7554123072312">select `name` as `mingzi` from t1;</pre>
|
|
<p id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_p9877131982310"><strong id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_b1044332732320">Output</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_screen74321835102314">SELECT
|
|
"name" AS "mingzi"
|
|
FROM
|
|
t1;</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_section838618544146"><h4 class="sectiontitle">Double Quotation Mark (")</h4><p id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_p149096124168">In MySQL, constant strings are enclosed in double quotation marks, which are not supported by GaussDB(DWS). DSC changes them to single quotation marks during migration.</p>
|
|
<p id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_p4720112917203"><strong id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_b16544124210201">Input</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_screen4992105510206">select name from t1 where name = "test2";</pre>
|
|
<p id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_p1850463712010"><strong id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_b1398445102013">Output</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001772536548__en-us_topic_0000001706105025_en-us_topic_0000001442040729_screen20193105862011">SELECT
|
|
name
|
|
FROM
|
|
t1
|
|
WHERE
|
|
name = 'test2';</pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_16_0178.html">SELECT</a></div>
|
|
</div>
|
|
</div>
|
|
|