Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

sql ʱ¼äÎÊÌâ

sql table±íÓиöÎı¾ÀàÐ͵Äa×ֶΣ¬´æ´¢µÄÄÚÈÝÈ«²¿ÊÇÊý×Ö£¬ÀýÈç2009001£¬2008578ÕâÑùµÄ¸ñʽ£»b×Ö¶ÎÎı¾ÀàÐÍ£¬´æµÄÒ²ÊÇÊý×ÖÀýÈç 001£¬123
aspÀïÃæ strday=100£¬strb=001

ÎÒÏë¶Á³ö£¬´Óa×ֶεÄÊý×Ö°´´óµ½Ð¡µÄ˳Ðò£¬strdayÌõ¼Ç¼ÖÐb×ֶηûºÏstrbµÄ½á¹û

SELECT TOP "&strday&" * from [table] ORDER BY £á
¡­¡­¡­¡­
Do While Not Rs.Eof
    If Rs("b") = strb Then
      Response.Write "ÓÐ"
    else
      Response.Write "ÎÞ"
    end if

½á¹ûÈ«²¿ÏÔʾ¡°ÎÞ¡±£¬µ«Êý¾ÝÖдæÔÚÏà¹ØÊý¾Ý£¬ÇëÎÊÏÂÄǸöµØ·½ÓÐÎÊÌ⣿{{


Ïà¹ØÎÊ´ð£º

ÇóÒ»¸öSQLÓï¾ä - MS-SQL Server / »ù´¡Àà

×Ö¶Î1,×Ö¶Î2.....×Ö¶ÎN,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
ÏëÒªµÄ½á¹ûÊÇ:
1,Na ......

Çóһʱ¼ä±È½ÏµÄSQL Ö¸Áî - MS-SQL Server / »ù´¡Àà

±íÊý¾Ý
COL1 COL2 COL2 COL4 COL5
----------------------------------------------------------------------------------------------
2010-05-05 00:00 ......

¹ØÓÚSQLÓï¾äORµÄÎÊÌâ - Oracle / ¸ß¼¶¼¼Êõ

ͨ¹ýNAME×Ö¶ÎÌõ¼þ²éѯһ¸öÊý¾Ý±í£¬¼ÙÉèÎÒÓÐ100¸öÐÕÃû£¬ÓÐÒÔÏÂÁ½¸ö·½·¨£¬
·½·¨1£º
°Ñ100¸öName ×é³ÉÒ»¸öSQLÓï¾ä£¬±ÈÈç Select * from tmp_table where Name='ÕÅÈý' or Name ='ÀîËÄ' Or ...Or Name='µÚÒ»°Ù¸öÐÕÃû'
......

ASPÒ³ÃæÎÞ·¨´ò¿ªÇóÖú£¡ - MS-SQL Server / »ù´¡Àà

¸÷λºÃ£¬ÎÒ¸Õ°ÑÒ»¸öASPÍøÕ¾ÉèÖúÃÁË£¬Ò²ÄÜÕý³£·ÃÎÊ¡£µ«ÊÇÔÚÎÒ±¾»úÉϲ»ÄÜ´ò¿ªadmin\login.asp,ËùÒÔÎÞ·¨ÊµÏÖºǫ́¹ÜÀí¡££¨´íÎóÌáʾÎÞ·¨ÕÒµ½ÍøÒ³£¬´úÂë404£¬ÎҵIJÙ×÷ϵͳÊÇwin2000 server)
µ«ÊÇÆæ¹ÖµÄÊÇÔÚ¾ÖÓòÍøµÄÆäËû» ......

sqlÓï¾äÎÊÌâ - Java / Web ¿ª·¢

select o_customer,o_price from orders having o_price >=avg(o_price)
select o_customer,o_price from orders where o_price >=(select avg(o_price) from orders)
ÎҸоõûÓÐÇø±ð°¡£¬ÔõôÔÚmysql»áÓÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ