数据仓库服务 GaussDB(DWS)-字符处理函数和操作符:quote_ident(string text)

时间:2025-02-12 15:04:44

quote_ident(string text)

描述:返回适用于SQL语句的标识符形式(使用适当的引号进行界定)。只有在必要的时候才会添加引号(字符串包含非标识符字符或者会转换大小写的字符)。返回值中嵌入的引号都写了两次。

返回值类型:text

示例:

12345
SELECT quote_ident('hello world'); quote_ident-------------- "hello world"(1 row)
support.huaweicloud.com/sqlreference-910-dws/dws_06_0030.html