更新时间:2024-11-15 GMT+08:00

引号

单引号

MySQL中别名带单引号,GaussDB(DWS)不支持,DSC迁移改为双引号。

输入示例

1
select name as 'mingzi' from t1;

输出示例

1
2
3
4
SELECT
  name AS "mingzi"
FROM
  t1;

反引号

MySQL中别名、列名带反引号,GaussDB(DWS)不支持,DSC迁移改为双引号。

输入示例

1
select `name` as `mingzi` from t1;

输出示例

1
2
3
4
SELECT
  "name" AS "mingzi"
FROM
  t1;

双引号

MySQL中常量字符串用双引号扩住,GaussDB(DWS)不支持,DSC迁移改为单引号。

输入示例

1
select name from t1 where name = "test2";

输出示例

1
2
3
4
5
6
SELECT
  name
FROM
  t1
WHERE
  name = 'test2';