declare @table table (sid_id int) insert into @table select 1 union all select 2 union all select 3 union all select 4 union all select 5 select * from @table update @table set sid_id=t2.sid_id2 from @table as t1 left join (select sid_id,sid_id+2063 as sid_id2 from @table) as t2 on t1.sid_id=t2.sid_id select * from @table
update 加上一个数字就行了?
各表中的列名必须唯一。在表 'table_slystd' 中多次指定了列名 'sid'。
insert into @table
select 1 union all
select 2 union all
select 3 union all
select 4 union all
select 5
select * from @table
update @table set sid_id=t2.sid_id2 from @table as t1 left join
(select sid_id,sid_id+2063 as sid_id2 from @table) as t2 on t1.sid_id=t2.sid_id
select * from @table
sid_id, 增加个新字段, 再update tb set sid=sid_id