日期:2014-05-17 浏览次数:20541 次
if OBJECT_ID('testtb') is not null
drop table testtb
go
create table testtb
(id int identity(1,1) not null,
iQty dec(18,2),
Version timestamp
)
insert into testtb (iQty)
select 12
begin tran
select CAST(Version as bigint) from testtb
where id=1
update testtb set iQty=12 where id=1
select CAST(Version as bigint) from testtb
where id=1
commit tran