拼接字符串(有些地方需要注意)

 1 print '1' + 1                    --2
 2 
 3 print 1 + 'df'                    --在将 varchar 值 'df' 转换成数据类型 int 时失败。
 4 
 5 print '11' + '11'                --1111
 6 
 7 select 'daaa' + 'dddd'            --daaadddd
 8 
 9 print concat('aa', 'bb', 'cc')    --aabbcc
10 
11 print concat(1, 2, 3)            --123
12 
13 print concat(1, 2, 3, 'fdsf')    --123fdsf

 

posted @ 2019-04-18 19:52  vvull  阅读(187)  评论(0编辑  收藏  举报