oracle与sqlsever的区别
区别一
sql
oracle字符之间连接用||
sqlserver字符之间连接用+
区别二
sql
oracle字段重命名用as
sqlserver字段重命名用=
区别三
sql
oracle判空用nvl
sqlserver判空用isnull
区别四
sql
oracle多列合并成一列
select
assid,
LISTAGG(name,' ') within group (order by name ) as assconbilename
from temp_gl_fzhs_view
group by assid
sqlsever多列合并成一列
SELECT
assid,
assconbilename((select ','+name FROM temp_gl_fzhs_view WHERE assid = fz.assid for xml path('')),1,1,'')
FROM temp_gl_fzhs_view fz
group by assid