Õâ¾äsqlʲôÒâ˼ - MS-SQL Server / »ù´¡Àà
select * from tb t where (select count(1) from tb where id<=t.id) between 10 and 20
Õâ¾äsqlÊÇÈçºÎÖ´ÐÐµÄ Ò²¾ÍÊÇÔÀíÊÇʲô£¿ ÎÒ¿´²»¶®£¡~~~
µ±Ç°¼Ç¼ȥִÐÐ (select count(1) from tb where id<=t.id) µÄ½á¹ûÔÚ10-20Ö®¼ä¡£
½¨ÒéÄãÏÈ×Ô¼ºÊÔ׎âÊÍÒ»ÏÂÕâ¸öÓï¾ä£¬·ñÔò±ðÈËÒ²¸ù±¾²»ÖªµÀÄãÄ¿Ç°ÒѾ¶®ÁËʲô£¬µ½Ê²Ã´²ã´Î£¬µ½µ×ÊÇÄĶù²»¶®¡£
д³öÄã×Ô¼ºµÄÀí½â£¬È»ºóÈñðÈËÀ´¿´ÄãµÄÀí½âÊÇ·ñÕýÈ·¡£ ·ñÔò±ðÈ˽âÊ͹ý¼òµ¥Ä㻹ÊÇÀí½â²»ÁË£¬½âÊ͵ùýϸ£¬¿ÉÄÜÓÖÊǸù±¾²»±ØÒª¡£
ÕâÑùµÄд·¨ ÎÒ½ñÌì¸Õ¿´¼û¹ý º¹~~~
¿ÉÒÔ˵¶¼²»Àí½â£¬Ï£ÍûÄÜÏêϸµãµÄ½â´ð~~
лл
select * from tb t where (select count(1) from tb where id<=t.id) between 10 and 20
ºÃÏñÓ¦¸ÃÄÜÈ¡³öµÚ 11µ½µÚ20Ìõ¼Ç¼
ÄÚ²ãµÄÿһÌõ¼Ç¼ÓëÍâ²ãµÄµ±Ç°¼Ç¼½øÐбȽϣ¬ÐγɱȽϽá¹û¿´ÊÇ·ñµ±Ç°¼Ç¼Âú×ãÌõ¼þ
SQL code:
--> Éú³É²âÊÔÊý¾Ý±í: [tb]
IF OBJECT_ID('[tb]') IS NOT NULL
DROP TABLE [tb]
GO
CREATE TABLE [tb] ([id] [int],[name] [nvarchar](10))
INSERT INTO [tb]
SELECT '1','a1' UNION ALL
SELECT '3','a2' UNION ALL
SELECT '6','a3' UNION ALL
SELECT '8','a4' UNION ALL
SELECT '10','a5' UNION ALL
SELECT '13','a6' UNION ALL
SELECT '15','a7' UNION ALL
SELECT '18','a8' UNION ALL
SELECT '20','a9' UNION ALL
SELECT '23','a10' UNION ALL
SELECT '25','a11' UNION ALL
SELECT '28','a12' UNION ALL
SELECT '30','a13' UNION ALL
SELECT '33','a14' UN
Ïà¹ØÎÊ´ð£º
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
sqlµÄÈí¼þÔÚÄÄÀï¿ÉÒÔÏ°¡£¡ÔÚÍøÉÏÕÒÁËÂù¶à¶¼Óò»ÁË°¡
Ëæ±ã¸ãÒ»D°æ°É£¬
ѸÀ×µÚÒ»¸ö¾Í¿ÉÒÔÓÃ
2000,2005¶¼ÕâÑù
http://119.147.41.16/down?cid=0698C2D64D7D637D90A6D2482298E6717D4F15CD&t=2&fmt=-1 ......
¸÷λºÃ£¬ÎÒ¸Õ°ÑÒ»¸öASPÍøÕ¾ÉèÖúÃÁË£¬Ò²ÄÜÕý³£·ÃÎÊ¡£µ«ÊÇÔÚÎÒ±¾»úÉϲ»ÄÜ´ò¿ªadmin\login.asp,ËùÒÔÎÞ·¨ÊµÏÖºǫ́¹ÜÀí¡££¨´íÎóÌáʾÎÞ·¨ÕÒµ½ÍøÒ³£¬´úÂë404£¬ÎҵIJÙ×÷ϵͳÊÇwin2000 server)
µ«ÊÇÆæ¹ÖµÄÊÇÔÚ¾ÖÓòÍøµÄÆäËû» ......
SQL code:
rs.open "select * from guide where city_name='±±¾©' order by pai desc",conn,1,1
do while not rs.eof or rs.bof
¡£¡£
¡£¡£
¡£¡£
rs.movenext
loop
Õâ¸ösqlÓï¾äÔÚwapÕ¾Àï ±¾ÉíÓÐ ......
A±í ÓÐÁ½¸ö×Ö¶Î
id ΨһÊý×ÖÓò
InfoTxt text ÀàÐÍ
ÎÒÏÖÔÚÒª°Ñ id ²»ÊÇ14 µÄËùÓÐ InfoTxt×ֶΠÎı¾ºóÃæ ¶¼¼ÓÉÏ 'aaa'
°´ÏÂÃæÖ´ÐÐÏÂÀ´ Ö»Óбí×îºóÒ»ÐмÓÉÏÁË 'aaa' ......