扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:Andrew_Fryer 来源:blog 2007年11月19日
关键字: SQL Server 2008 SQL Server 数据库
It's the little thing that make you smile. I am at TechEd this week at an excellent session by Bob Beauchemin on the T_SQL enhancements in SQL Server 2008.
He popped up a slide with the += operator which allows you add a number to itself in common with many other languages so:
@MyNumber += 2 would add to the number (this also works for minus, multiplication and divide).
Somebody asks Bob "Does that work with strings as well?"
Let's check that Bob says.
declare @myName varchar(12) = 'Bob'
set @myName += ' Foo'
Print @myName
that returns 'Bob Foo' which is what you'd expect but good to know.
So top marks to Bob for his presentation style, and to the product guys for making the new function consistent.
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者