Karp

SQL 两列字段,合并为一个字符串,中间加符号
数值型:select cast(a as varchar(10))+','+cast(b as varchar(1...
扫描右侧二维码阅读全文
10
2017/03

SQL 两列字段,合并为一个字符串,中间加符号

数值型:

select cast(a as varchar(10))+','+cast(b as varchar(10)) from tablename

字符型:

select a+','+b from tablename

字符型:

varchar
select a+','+b from tablename
char
select rtrim(a)+','+rtrim(b) from tablename
Last modification:March 10th, 2017 at 01:02 am

Leave a Comment