update qtable set Section = Section + ',Teaching' where qid=522
此更新语句不会连接/附加值。
Section contains null value initially.
concat()
如果您使用的是 SQL Server 2012,请使用:
update qtable
set Section = concat(Section, ',Teaching')
where qid=522;
对于旧版本,您可以使用
update qtable
set Section = coalesce(Section, '') + ',Teaching'
where qid=522;
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句