Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Delinda
Constraint Violating Yak Guru
315 Posts |
Posted - 2009-12-12 : 19:43:34
|
My SQL as follow,declare @tEmployee table(TrnxID int primary key identity(1,1),Nme varchar(100),RowID rowversion)insert into @tEmployee(Nme) values('Mike Tyson')insert into @tEmployee(Nme) values('Hollyfield')It's possible, the RowID value equal to 0x0000000000000000 after insert or update statement? |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-12-12 : 19:56:10
|
I have read that rowversion is a synonym for timestamp.So I don't believe it can be 0x0000000000000000 because it is the increasing database timestamp. No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
Delinda
Constraint Violating Yak Guru
315 Posts |
Posted - 2009-12-12 : 20:37:29
|
quote: Originally posted by webfred I have read that rowversion is a synonym for timestamp.So I don't believe it can be 0x0000000000000000 because it is the increasing database timestamp. No, you're never too old to Yak'n'Roll if you're too young to die.
From my SQL statement,declare @tEmployee table(TrnxID int primary key identity(1,1),Nme varchar(100),RowID rowversion)insert into @tEmployee(Nme) values('Mike Tyson')insert into @tEmployee(Nme) values('Hollyfield')SQL 1 - select * from @tEmployeethe result as follow,1 Mike Tyson 0x00000000000007FA2 Hollyfield 0x00000000000007FBSQL 2 - select TrnxID,Nme,cast(RowID as BigInt) from @tEmployeethe result as follow,1 Mike Tyson 20422 Hollyfield 2043Did SQL 1 and SQL 2 same? I convert RowVersion to BigInt because i want to make it front-end (ASP.NET) can read it easily. |
|
|
|
|
|
|
|