赛捷软件论坛's Archiver

vicky.yu 发表于 2019-2-15 11:11

快速获取表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)

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.