以下变量赋值在 T-SQL 中意味着什么?
SET @myvariable += 'test'
最佳答案
与许多其他编程语言相同 - 附加(或根据变量的数据类型添加,但在本例中附加)到现有值。
例如如果 @myvariable 的值当前为 hello
,则在此赋值之后,该值将为 hellotest
。
它是 SQL Server 2008 中引入的 SET @myvariable = @myvariable + 'test'
的快捷方式。
关于sql - "+="在T-SQL中是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11991188/