declare @var1 int
declare @var2 int
set @var1 = 1
set @var2 = 2
SELECT @var1 =@var1 +@var2
select @var1,@var2
select @var2=@var1- @var2
select @var1,@var2
select @var1=@var1-@var2
select @var1,@var2
/*Table*/
create table #temp
(
Value1 varchar(10),
Value2 varchar(10)
)
insert into #temp
select '1','2'
update #temp
set Value1 = Value2,Value2=Value1
select * from #temp
No comments:
Post a Comment