Article View: cn.bbs.comp.database
Article #283请教一个SQL排序问题
From: Devin
Date: Thu, 25 Jun 2009 08:21
Date: Thu, 25 Jun 2009 08:21
10 lines
1437 bytes
1437 bytes
�Ҽǵ�ԭ���ù�һ�����������SQL�����mysql�С� select * from table where id in (29, 17, 19) order by id in (29,17,19) id����������Ľ��������Ϊ17,19,29����������ݣ����Ұ��� 29,17,19��˳ ���ź����� ���Ҳ�̫�ǵ�order ... ������ôдȥ�ˣ������������䲢����ȷ�� ��֪������λ֪��������ôд��
Technical Details
Message-ID:
<h1vc18$l82$1@news.cn99.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news1.google.com!news.glorb.com!newsgate.cuhk.edu.hk!news.cn99.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 4df683fd51,b94e4c8e68d5fd7b,start X-Google-Attributes: gid4df683fd51,public,usenet X-Google-NewGroupId: yes X-Google-Language: Chinese,GB Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news1.google.com!news.glorb.com!newsgate.cuhk.edu.hk!news.cn99.com!not-for-mail From: Devin <gnujava@gmail.com> Newsgroups: cn.bbs.comp.database Subject: 请教一个SQL排序问题 Date: Thu, 25 Jun 2009 16:21:08 +0800 Organization: A poorly-installed InterNetNews site Lines: 10 Message-ID: <h1vc18$l82$1@news.cn99.com> NNTP-Posting-Host: 222.247.136.60 Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit X-Trace: news.cn99.com 1245918056 21762 222.247.136.60 (25 Jun 2009 08:20:56 GMT) X-Complaints-To: news@news.cn99.com NNTP-Posting-Date: Thu, 25 Jun 2009 08:20:56 +0000 (UTC) User-Agent: Thunderbird 2.0.0.21 (X11/20090409)