摘要:
CREATETABLE#temp(nameVARCHAR(20),jobVARCHAR(20),ageINT,COUNTINT)INSERT#tempSELECT'周杰伦','歌手',25,2010UNIONALLSELECT'周杰伦','歌手',26,1444INSERT#tempSELECT'刘德华','演员',40,1101UNIONALLSELECT'刘德华','演员',45,4664IN... 阅读全文
摘要:
useMASTERdeclare@spidintdeclareCURcursorforselectspidfromsysprocesseswheredbid=(selectdbidfromsysdatabaseswherename='ycmis')opencurfetchnextfromCURinto@spidwhile@@FETCH_STATUS=0beginexec('KILL'+@spid)... 阅读全文
摘要:
selecttop1000*from费用表where费用ID<any(selecttop10(费用id)from费用表orderby费用IDasc)selecttop1000*from费用表where费用ID>all(selecttop10(费用id)from费用表orderby费用IDasc)selecttop1000*from费用表where费用ID<some(selectt... 阅读全文