--云星空重建索引SQLDECLARE@sqlNVARCHAR(1000)=DBCCDBREINDEX(@TABLE_NAME)WITHNO_INFOMSGS;DECLARE@tblNVARCHAR(1000)=DECLAREtblcurCURSORFORSELECT[NAME]FROMsys.tablesWHERE[NAME]NOTLIKETMP%AND[NAME]NOTLIKEZ[_]%ORDERBY1FORREADONLYOPENtblcurFETCHNEXTFROMtblcurINTO@tblWHILE@@FETCH_STATUS=0BEGINEXECSP_EXECUTESQL@sql,N@table_nameNVARCHAR(1000),@tblPRINT表重建索引成功:+@tblFETCHNEXTFROMtblcurINTO@tblENDCLOSEtblcurDEALLOCATEtblcurPRINT全部执行完成!
--鑱屼綅寮曠敤鏍¢獙selectT_MM_OperationPositionEntryas寮曠敤鐨勮〃fromT_MM_OperationPositionEntrywhereFOperationID=/SOwiUlwSxmbuf53vieCEnSuYS4=unionallselectT_HR_CadreDismisBizBillEntryfromT_HR_CadreDismisBizBillEntrywhereFPositionID=/SOwiUlwSxmbuf53vieCEnSuYS4=unionallselectT_HR_FluctuationBillEntryfromT_HR_FluctuationBillEntrywhereFNewPositionId=/SOwiUlwSxmbuf53vieCEnSuYS4=unionallselectT_CP...