SQL SERVER 2012 T-SQL新增特性-CONCAT
来源:未知 责任编辑:责任编辑 发表时间:2013-11-17 14:41 点击:次
SQL SERVER 2012 T-SQL 新增特性- CONCAT
SQL SERVER 2012 T-SQL 新增特性- CONCAT函数,做了很大改进,比以前简单好用。
[sql]
declare @data as table
( row_id tinyint identity(1,1) primary key, order_dt datetime2(2))
insert into @data(order_dt)values ('20110305 4:30PM'), ('20110817 12:45PM')
www.2cto.com
select
'Order placed on ' + cast(cast(d.order_dt as date) as varchar) + ' (row_id = ' + cast(d.row_id as varchar) + ').' as BEFORESQLSERVER2012,
concat('Order placed on ', cast(d.order_dt as date), ' (row_id = ', d.row_id, + ').') as SQLSERVER2012
from @data d
作者 incognito007
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>