请帮忙解决以下更新问题!!!偶想了三天半没解决~ select id=identity(int,1,1) , * into test from tbselect zd1 + cast(id as varchar) from test 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 declare @t table(CODE varchar(8))insert into @t select 'C'insert into @t select 'C'insert into @t select 'C'insert into @t select 'C'insert into @t select 'C'insert into @t select 'C'insert into @t select 'C'insert into @t select 'C'declare @i intset @i=0update @t set @i=@i+1,CODE=CODE+rtrim(@i)select * from @t/*CODE -------- C1C2C3C4C5C6C7C8*/ exec sp_msforeachtable 'DBCC CHECKTABLE(''?'',REPAIR_REBUILD)' --修复表exec sp_msforeachtable 'DBCC DBREINDEX(''?'')' --重建索引 在视图中是否能进行两表某个字段的对比? 统计字符长度 数据库缓存的问题 请问一条SQL语句的写法 如何用游标插入 多个多对多关系如何建模 问一个数据库导入excel文件的问题 关于SQL语句问题,请高手帮忙,各位大侠救命啊 表与表之间的连接问题。 怎么啟動及停止別人機器上的SQL Server及Server Agent. 关于:通过存储过程新增和修改数据 关于远程联系到本机SQL问题
insert into @t select 'C'
insert into @t select 'C'
insert into @t select 'C'
insert into @t select 'C'
insert into @t select 'C'
insert into @t select 'C'
insert into @t select 'C'
insert into @t select 'C'declare @i int
set @i=0update @t set @i=@i+1,CODE=CODE+rtrim(@i)select * from @t/*
CODE
--------
C1
C2
C3
C4
C5
C6
C7
C8
*/
exec sp_msforeachtable 'DBCC DBREINDEX(''?'')' --重建索引