赞
踩
CONCAT (string1, string2, ...)
示例:
SELECT CONCAT('Hello', ' ', 'World') as combined_string;
输出结果为:Hello World
CONCAT_WS (separator, string1, string2, ...)
示例:
SELECT CONCAT_WS('-', 'First', 'Second', 'Third') as combined_string;
输出结果为:First-Second-Third
CONCATN (separator, string1, string2, ...)
示例:
SELECT CONCATN('-', 'First', 'Second', 'Third') as combined_string;
输出结果为:First-Second-Third
REPLACE (string, old_substring, new_substring)
示例:
SELECT REPLACE('Hello World', 'World', 'SQL Server') as replaced_string;
输出结果为:Hello SQL Server
+ expression
示例:
SELECT 'Hello' + CAST(123 AS VARCHAR(10)) as combined_string;
输出结果为:Hello123
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。