返回列表 发帖

快速获取表test的记录总数[对大容量表非常有效]

快速获取表test的记录总数:

select rows from sysindexes where id = object_id('test') and indid in (0,1)



update 2 set KHXH=(ID+1)\2 2行递增编号

update [23] set id1 = 'No.'+right('00000000'+id,6) where id not like 'No%' //递增

update [23] set id1= 'No.'+right('00000000'+replace(id1,'No.',''),6) //补位递增

delete from [1] where (id%2)=1

奇数

替换表名字段

update [1] set domurl = replace(domurl,'Upload/Imgswf/','Upload/Photo/') where domurl like '%Upload/Imgswf/%'

截位

SELECT LEFT(表名, 5)



截位

SELECT LEFT(表名, 5)

返回列表