摘要:
setnocountonifobject_id(N'tempdb.db.#temp')isnotnulldroptable#tempcreatetable#temp(namesysname,countnumeric(18))insertinto#tempselecto.name,i.rowsfromsysobjectso,sysindexesiwhereo.id=i.idando.Xtype='U'andi.indid<2selectcount(count)总表数,sum(count)总记录数from#tempselect*from#temporderby 阅读全文