求救!~(十万火急,倾家求助)关于SQLSERVER主关键字问题~! 再说清楚点SQLSERVER中能不能设置让数据让我们每次删除一条记录后,让它自动按顺序排列,,列如:有0,1,2,3,……数据我删除中间2数据,,然后它自己自动排成0,1,2……救命!~或者用程序怎么实现,万分感激~! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 update Atableset id=id-1where id>删除的id update yourtable set id=id-1 where id > 2 在SQL中设置位int型吧,在识别一栏中打个勾就ok拉 update Atableset id=id-1where id>删除的id 文本型的没有关系,如果你的文本里面存的是整型Sql server也能自动识别以下写法delete from table1 where id=2update table1set id=id -1where id>'2'不放心的话,写成以下delete from table1 where id='2'update table1set id=cast((cast(id as int)-1 ) as varchar(10))where id>'2' 同意楼上,我认为这样做没什么意义,难道INT类型的数据不够你用的? 调整图片背景亮度? 同志们,问题严重了,关于读取网络连接名称的问题!!! 关于计算dxDBGrid的合计问题! GetFieldData()这个怎么用,谢谢! 如何从服务器上自动下载最新版本的软件? 关于Form的Print问题 delphi的bug?--带菜单MDI子窗口的关闭按钮无效却可关闭. 问,我用ADOQUERY从SQL SERVER 查询的数据如何保存到ACCESS数据库中 如何在delphi中取得系统的temp目录的具体路经 怎样增加我的可用分?我实在是无分可给了.... SQL SERVER服务器连接时好时坏 300分关于目录处理的问题!
set id=id-1
where id>删除的id
set id=id-1
where id>删除的id
update table1
set id=id -1
where id>'2'不放心的话,写成以下
delete from table1 where id='2'
update table1
set id=cast((cast(id as int)-1 ) as varchar(10))
where id>'2'