第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

一條sql查詢語句

一條sql查詢語句

30秒到達戰(zhàn)場 2018-09-12 08:05:06
elect top (50) PaperId from TB_Paper where QuestionTypeId=1 and PaperDegree ='0' or PaperDegree='1' or PaperDegree='2'  我希望查詢出來的結果集中這50條數(shù)據滿足PaperDegree ='0'這個條件的占40%   滿足PaperDegree='1'這個條件的 的占了 40%  滿足PaperDegree='2'這個條件的占了20%數(shù)據量會比較大,我希望寫的時候可以考慮到優(yōu)化。
查看完整描述

1 回答

?
白衣染霜花

TA貢獻1796條經驗 獲得超10個贊

select top(20) PaperId from TB_Paper where QuestionTypeId=1 and PaperDegree ='0' union all 

select top(20) PaperId from TB_Paper where QuestionTypeId=1 and PaperDegree ='1' union all

select top(10) PaperId from TB_Paper where QuestionTypeId=1 and PaperDegree ='2'

這樣寫,性能應該不至于太差


查看完整回答
反對 回復 2018-09-16
  • 1 回答
  • 0 關注
  • 369 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號