













declare @defaultGroup int select top 1 @defaultGroup=isnull([InvoiceGroup],0) from #t1 where ItemType=2 print @defaultGroup
我原来以为,如果#t1里面没有ItemType=2的记录,应该也会将@defaultGroup赋值为0,
结果颠覆我的认知,@defaultGroup 是啥都没有,下面print 没有任何内容出来。
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。