科技行者

行者学院 转型私董会 科技行者专题报道 网红大战科技行者

知识库

知识库 安全导航

至顶网软件频道SQL Server 2008 T-SQL - you learn something new everyday

SQL Server 2008 T-SQL - you learn something new everyday

  • 扫一扫
    分享文章到微信

  • 扫一扫
    关注官方公众号
    至顶头条

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.

作者: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.

    • 评论
    • 分享微博
    • 分享邮件
    闁喕娆㈢拋銏ゆ

    婵″倹鐏夐幃銊╂姜鐢瓕鎻╅崚鍥╂畱閹厖绨$憴顤廡妫板棗鐓欓張鈧弬棰侀獓閸濅椒绗岄幎鈧張顖欎繆閹垽绱濋柇锝勭疄鐠併垽妲勯懛鎶姐€婄純鎴炲Η閺堫垶鍋栨禒璺虹殺閺勵垱鍋嶉惃鍕付娴f娊鈧柨绶炴稊瀣╃閵嗭拷

    重磅专题
    往期文章
    最新文章