Article View: cn.bbs.comp.database
Article #1113Re: ��̸�����
From: Galaxy��VOLUNTEERS
Date: Mon, 05 May 2008 05:36
Date: Mon, 05 May 2008 05:36
37 lines
2590 bytes
2590 bytes
��Ĵ��벻����һ��̫�ֲ��ˡ����� ��������һ�£� select * from ( select top(99.99) percent from (select * from table where ... )t1) 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) t4 union all select * from (select top(99.99) percent from (select * from table where ... )t5) order by a desc, b desc) t6 ������û������ΪʲôҪ��top 99.99 �� �� Goliath (Schumi) �Ĵ������ᵽ: �� : ����������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%����û������ʲô�취���Դﵽ���Ŀ��? -- I thought what I'd do was, I'd pretend I was one of those deaf-mutes Or should I? You know what I��d like to be? I mean if I had my goddam choice, I��d just be the catcher in the rye and all. [m[1;36m�� ��Դ:����ˮ˼Դ bbs.sjtu.edu.cn��[FROM: 207.46.55.30][m
Technical Details
Message-ID:
<4ZicZ5$bmc@bbs.sjtu.edu.cn>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!newsgate.cuhk.edu.hk!news.neu.edu.cn!news.shec6.edu.cn!SJTUShow Full Headers
Complete Article Headers
X-Google-Thread: 101948,a06b71a23ba3f058 X-Google-Attributes: gid101948,domainid0,public,usenet X-Google-Language: ENGLISH,GB Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!newsgate.cuhk.edu.hk!news.neu.edu.cn!news.shec6.edu.cn!SJTU From: Dem.bbs@bbs.sjtu.edu.cn (Galaxy��VOLUNTEERS) Newsgroups: cn.bbs.comp.database Subject: Re: ��̸����� Date: 05 May 2008 05:36:10 GMT Organization: ��ˮ˼Դ Message-ID: <4ZicZ5$bmc@bbs.sjtu.edu.cn> Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 8bit X-Filename: database/M.1209965717.A