🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.database
Article #1111

��̸�����

#1111
From: Schumi
Date: Mon, 05 May 2008 03:46
15 lines
1739 bytes
����������a,b(��Ϊ��ֵ��),Ҫ��õ��Ľ���Ϊ���,��һ������a>20 and b>20��
����,�ڶ�������(a>20 and b<=20) or (a<=20 and b>20)�IJ���,�������a<=20 an
d b<=20�IJ���,��ָ��Ը��a desc, b desc�ķ������,����Ӧ����ν��.

����������union all�İ취���,�����Բ�ѯ����ֱ������,��ʹ�õ���top���,��sel
ect * from (select top(99.99) percent from (select * from table where ... )t
1)  order by a desc, b desc) t2 union all  select * from (select top(99.99) 
percent from (select * from table where ... )t3)  order by a desc, b desc) t
4 union all  select * from (select top(99.99) percent from (select * from ta
ble where ... )t5)  order by a desc, b desc) t6

����top()percent ������ʹ��100%����û������ʲô�취���Դﵽ���Ŀ��?
--

�� ��Դ:����ˮ˼Դ bbs.sjtu.edu.cn��[FROM: 207.46.55.31]
Technical Details
Message-ID: <4ZiZW4$bif@bbs.sjtu.edu.cn>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!newsgate.cuhk.edu.hk!news.neu.edu.cn!news.shec6.edu.cn!SJTU

Show Full Headers
Complete Article Headers
X-Google-Thread: 101948,a06b71a23ba3f058,start
X-Google-Attributes: gid101948,domainid0,public,usenet
X-Google-Language: Chinese,GB
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!newsgate.cuhk.edu.hk!news.neu.edu.cn!news.shec6.edu.cn!SJTU
From: Goliath.bbs@bbs.sjtu.edu.cn (Schumi)
Newsgroups: cn.bbs.comp.database
Subject: ��̸�����
Date: 05 May 2008 03:46:36 GMT
Organization: ��ˮ˼Դ
Message-ID: <4ZiZW4$bif@bbs.sjtu.edu.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: database/M.1209958660.A