当前位置: 代码迷 >> Sql Server >> 有这样的用法吗,该如何处理
  详细解决方案

有这样的用法吗,该如何处理

热度:92   发布时间:2016-04-27 16:16:18.0
有这样的用法吗
select   @end_date   =   @curr_date
[email protected][email protected]_date?谁能给我解释下

------解决方案--------------------
可以
------解决方案--------------------
[email protected][email protected]_date
------解决方案--------------------
--例子 自己看看就知道了
declare @test int
declare @sub int

select @test=1
select @[email protected]

select @test,@sub

------解决方案--------------------
和其它語言中賦值一樣的
------解决方案--------------------

declare @curr_date varchar(20)
declare @end_date varchar(20)
select @curr_date= 'a '
select @end_date= 'b '
select @[email protected]_date
select @curr_date

结果
b
  相关解决方案