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

ÇóÒ»ÌõsqlÓï¾ä - MS-SQL Server / ÒÉÄÑÎÊÌâ

Á½¸ö±íA,BÁ¬±í²éѯ£¬ÆäÖÐAÓÐid,name×Ö¶Î,BÓÐaid,cid×ֶΣ¬A.idºÍB.aidÊǹØÁªµÄ£¬B.cidÓкܶàÖظ´£¬ÇëÎÊÔõÑùÓÃÒ»¾ä»°ËÑË÷³öA.id,A.name,B.cidÁ¬±í½á¹û£¬ÆäÖи÷×ֶζ¼²»ÄÜÓÐÖظ´
ÊÇÕûÌõ¼Ç¼²»ÄÜÖظ´»¹ÊÇÿ¸ö×ֶζ¼²»ÄÜÖظ´£¿
Èç¹ûÓÐÖظ´ÒªÔõôȡ£¿

SQL code:
select distinct A.id,A.name,B.cid
from A,B where A.id=b.aid


SQL code:
select a.id,
a.name,
b.cid
from ta a ,tb b
where a.id=b.aid
and b.aid=(select max(aid)
from tb
where cid=b.cid)


ÒýÓÃ

SQL code
select distinct A.id,A.name,B.cid
from A,B where A.id=b.aid


À´µÄÖ±½ÓЩ...

²»ºÃÒâ˼˵´íÁË£¬²»ÊÇÿ¸ö×ֶζ¼²»Öظ´£¬ÊÇA±íµÄ×ֶβ»Öظ´£¬Èç¹ûB.cidÖظ´Ëæ±ãÈ¡Ò»Ìõ¾ÍÐÐ

xys_777ºÍwufeng4552µÄA±í¶¼ÓÐÖظ´

ÔÙ²¹³äһϣ¬BÖÐÒ»¸öÏàͬaid¿ÉÄܶÔÓ¦ºÜ¶à¸ö²»Í¬µÄcid£¬Í¬ÑùÒ»¸öÏàͬµÄcid¿ÉÄܶÔÓ¦²»Í¬µÄaid

×Ô¼º¶¥£¬´ó¼Ò°ïæ

SQL code:

with t as
(
select sn=ROW_NUMBER() over(partition by t1.aid order by t1.aid),* from (select a.aid, a.contents, c.cid from table1 a join table2 b on a.aid=c.bid) t1
)

select * from t where


Ïà¹ØÎÊ´ð£º

jspÁ´½Ósql2000µÄÒÉÎÊ£¿



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......

sqlССµÄÒÉÎÊ - .NET¼¼Êõ / C#

¿ÉÄÜÒòΪ¹¤×÷µÄÔ­Òò ½Ó´¥Êý¾Ý¿âÕâ¿é±È½ÏÉÙ£¬Ö®Ç°¶¼ÊÇ×ö³ÌÐòÕâ¿é£¬Êý¾Ý¿âÕâ¿é¶¼ÓÐרÃŵÄÈËÀ´×ö ·Ö¹¤¶¼ºÜÃ÷ϸ ËùÒÔ¶ÔÊý¾Ý¿âÕâÒ»¿éÍêÈ«²»Á˽⡣ǰ¶Îʱ¼ä È¥ÃæÊÔÁ˼¸¼Ò¹«Ë¾ ¼¸ºõ¶¼ÊÇÔÚÊý¾Ý¿âÕâ¿é¹ÒµôµÄ Á¬¸ö¼òµ¥µÄSQ ......

ÇóÒ»¸ö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 ......

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

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