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

sqlÓï¾ä»ñÈ¡¼Ç¼Êý

StrSQL="Select * from "&DataTable&" Where ID In("& ID &") and Shop_ID="&Shop_ID&Taxis


ÈçºÎ»ñÈ¡ËûµÄ¼Ç¼Êý?
@@ROWCOUNT

Select count(*) from

StrSQL="Select count(*) from "&DataTable&" Where ID In("& ID &") and Shop_ID="&Shop_ID&Taxis

count(1)

²»Ã÷°×°¡

ÒýÓÃ
@@ROWCOUNT

¶¥

StrSQL="Select COUNT(*) from "&DataTable&" Where ID In("& ID &") and Shop_ID="&Shop_ID&Taxis
ÔÚ³ÌÐòÖÐÕâÑùÓÃ

¿´Â¥Ö÷µÄÓï¾ä,Ó¦¸ÃÊÇÔÚ¿ª·¢³ÌÐòʱʹÓÃado¶ÔÏóÁ¬½ÓsqlÈ»ºó·µ»ØÊý¾ÝµÄ°É,Èç¹ûÊÇÕâÑù,ÄÇôado¶ÔÏ󶼻áÓÐÒ»¸öÊôÐÔ±êʶÕâ´Î²Ù×÷·µ»ØÁ˶àÉÙÐмǼµÄ.Èç¹ûÖ±½ÓÔÚsqlÀïÔËÐÐ,ÄÇô¿ÉÒÔÓÃϵͳ±äÁ¿@@rowcountÀ´È¥µÄ¼Ç¼Êý.

declare @rows int
select * from ±íÃû where Ìõ¼þ
set @rows = @@rowcount
select @rows
Õâ¶Î´úÂë¾ÍÄÜ·µ»ØËù²éѯµÄ¼Ç¼ÊýÁË.

StrSQL="Select count(*) from "&DataTable&" Where ID In("& ID &") and Shop_ID="&Shop_ID&Taxis

Á½ÖÖ¶¼¿ÉÒÔ£º
1.Count(*)
2.@@Rowcount


Ïà¹ØÎÊ´ð£º

ÃÅÍ⺺ÇóÖú...¹ØÓÚºǫ́+SQL+ASP

....½Óµ½Ò»¸öС³ÌÐò..¹¤×÷Ô­À´´ó¸ÅÊÇÕâÑùµÄ...ǰ̨ÊÇWEB·þÎñÆ÷.¼Ü¹¹¾ÍÊÇASP+SQL..ǰ̨ÓÉASPÏòSQLÌí¼Ó·þÎñÀà±ð(±íµ¥).È»ºóÓÖºǫ́³ÌÐò¶ÁÈ¡±íµ¥..Ҫʵʱ¶ÁÈ¡..È»ºóÏÔʾÔÚ·þÎñÆ÷ÉÏÃæ..´ÓÀíÂÛÉÏÃæÄÜÐÐͨ²»?Èç¹û¿ÉÒÔ..ºǫ́ ......

sql ʱ¼äÎÊÌâ

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

ÎÒÏë¶Á³ö£¬´Óa×ֶεÄÊý×Ö°´´óµ½Ð¡µÄË ......

ÇóSQL£¿

´ó¼ÒºÃ£¬ÇëÎÊÔÚ±íMÖÐÓÐ×ֶΣºa b c d e 
ÎÒÏë²é³öÆäÖÐÂú×ãÏÂÃæÈÎÒâÒ»ÏîµÄÊý¾Ý£¬1.×Ö¶Îa µÄÖµ²»ÊÇ ¡®Êé»ò±Ê»ò±¾¡¯ÖÐÈÎÒ»£¬2.aΪÊéµÄʱºò×Ö¶Îb,cÊÇ¿Õ;3.µ±aֵΪ±ÊµÄʱºòdÊÇ¿Õ;4.µ±aΪ±¾µÄʱºòb,d,e¶¼ÊÇ¿Õ;5.È ......

Õâ¸öSQL¸ÃÈçºÎд

дSQLÓï¾ä£º
±í1£ºCLASS
º¬ÓÐÁ½¸ö×ֶΣºID£¬CLASSNAME,±í½á¹¹ÈçÏ£º
ID CLASSNAME
1    A
2    B
3    C
4    D
±í2£ºSTUDENT
º¬ÓÐÈçÏÂ×ֶΣºS ......

Õâ¸öSQLÓï¾äÔõôд

ÓÐÒ»¸ö±í½á¹¹ÈçÏ£º
ÎïÆ·±àÂë  Ê¹ÓôÎÊý  Ãû³Æ  ÊôÐÔ1£¬ÊôÐÔ2.¡£¡£¡£¡£¡£¡£

ÆäÖУ¬Ç°Á½ÏîΪÖ÷¼ü£¨ÎïÆ·±àÂë  Ê¹ÓôÎÊý£©£¬´ÎÊý×î¶àΪ5

ÏÖÔÚÎÒÏë°Ñ ͬһÖÖÎïÆ·µÄ²»Í¬´ÎÊýµÄÊôÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ