Also, you can not insert explicit value in the TIMESTAMP column, SQL will throw an error --
declare @t table(names varchar(100), uid timestamp)
insert into @t (names, uid)
select 'test1', 1 union all
select 'test2', 1
select * from @t
Msg 273, Level 16, State 1, Line 2
Cannot insert an explicit value into a timestamp column. Use INSERT with a column list to exclude the timestamp column, or insert a DEFAULT into the timestamp column.
But, you can use NULL instead of 1.
declare @t table(names varchar(100), uid timestamp)
insert into @t (names, uid)
select 'test1', null union all
select 'test2', null
select * from @t
Result is:
names uid
test1 0x00000000000007DE
test2 0x00000000000007DF
commented on Jan 6 2012 1:41AM