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

SQL²éѯÿËùѧУÓïÎijɼ¨×î¸ßµÄѧÉúÐÅÏ¢

Êý¾Ý¿â ÓÐÁ½Õűí
±í1£º student
±í2£ºchinese
ÏÖÔÚÒª·Ö±ðÁгö ÿËùѧУ ÓïÎijɼ¨×î¸ßµÄ ѧÉúÐÅÏ¢
SQL £º
SELECT *
from student
LEFT JOIN chinese ON student.no = chinese.no
WHERE chinese.chengji
IN (
SELECT max( chinese.chengji )
from student
LEFT JOIN chinese ON student.no = chinese.no
GROUP BY student.school
ORDER BY chinese.chengji DESC
)
LIMIT 0 ,30
Ö´Ðнá¹û£º
PS:  SQL Óï¾äÒ²ÊÇÔÚѧϰÖС£¿ÉÄÜдµÄÒ²²»ÊǺܺà ÌùÉÏÀ´·½±ãÏñÎÒÕâÑùµÄ²ËÄñ½è¼øһϠÈçÓиüºÃµÄ·½Ê½ Ï£Íû»Ø¸´¸æËßÎÒһϡ£±¾È˽«Íò·Ö¸Ð¼¤¡£


Ïà¹ØÎĵµ£º

SQL SERVER 2008 ±Ê¼ÇÖ®ÐÐѹËõºÍҳѹËõ

 
/*
    2008 ѹËõ
 
 
    ÐÐѹËõ
   
    SQL SERVER 2008 Òý½øÁËÐÐѹËõÕâ¸öÐÂÌØÐÔ,Ö»ÓÐÆóÒµ°æ¾ßÓиÃÐÂÌØÐÔ.ÐÐѹËõÖ»ÐèÒª×îµÍµÄ¿Õ¼ä¶ÔÐÐÊý¾Ý½øÐÐѹËõ.ÐÐѹËõ¿ÉÒÔÔÚCREATEÒ»¸ö±í,Ë÷Òý»òÕßALTERÒ»¸ö±í,Ë÷ÒýµÄʱºò½øÐд´½¨.ѹËõ¿ÉÒÔÔÚ ......

SQL SERVER 2008µÄÒ»µã¹¤×÷×ܽá

×î½üÒ»Ö±ÔÚÓÃSQL SERVER, ·¢ÏÖƽʱ»ýÔܵÄһЩÎÊÌâÈç¹û²»¼°Ê±µÄ¼Ç¼ÏÂÀ´,ºÜ¿ì¾ÍÍüÁË. ¹ý¶Îʱ¼äÔÙ·¢ÏÖÏàͬÎÊÌâʱ,»¹Òª×öÖظ´¹¤×÷.
¶à×öЩ±Ê¼Ç°É, Ìá¸ßһϹ¤×÷ЧÂÊ.
1, ¶ÁÈ¡DBFÎļþ£¬´æÈëµ½SQL SERVERʱ£¬³öÏÖÎÊÌâÁ½¸ö¡£
µÚÒ»¸ö´íÎóÐÅÏ¢£º“·¢Éú´íÎó£ºERROR [IM001][Microsoft][ODBCÇý¶¯³ÌÐò¹ÜÀíÆ÷]Çý¶¯³ÌÐò²»Ö§³Ö´Ë ......

sql ×óÁ¬½Ó ½âÊÍ

Á¬½Ó²éѯ£¬¾ÍÊǽ«
Á½¸ö»ò¶à¸ö
±í»òÊÓͼ
ͨ¹ýÒ»¶¨µÄÌõ¼þ
½«È«²¿»ò²¿·Ý×Ö¶Î
È«²¿»ò²¿·Ý¼Ç¼
Á¬½Óµ½Ò»Æ𣬵õ½Ò»¸öеÄÊý¾Ý¼¯ºÏ¡£
È磺ÓÐÈËÔ±µµ°¸ºÍ¹¤×ʵµ°¸Á½¸ö±í£¬Á½¸ö±íÓй²Í¬µÄ¹Ø¼ü×Ö¶ÎXMDM(ÐÕÃû´úÂ룩£¬ÆäÖÐÈËÔ±µµ°¸´æ´¢ÁËÈËÊÂ×ÊÁÏ£¬¹¤×ʵµ°¸´æ´¢ÁËн³ê×ÊÁÏ¡£
Òò´Ë¿ÉÒÔͨ¹ýXMDM×ֶν«Á½¸ö±íÁ¬½ÓÆðÀ´£¬´Ó¶øʹ²éѯ½ ......

SQL SERVER 2005Ⱥ¼¯


SQL SERVER 2005µÄȺ¼¯±ØÐëÔÚʵÏÖÁËWINDOWSȺ¼¯µÄ»ù´¡ÉϲſÉÒÔ¡£
Ê×ÏÈÎÒÃÇÏÈÀ´¿´Ò»ÏÂSQL SERVER 2005Ⱥ¼¯µÄһЩÏà¹Ø½éÉÜ£º
ÔÚSQL SERVER 2005ÖÐÖ÷Òª¿ÉÒÔʹÓþµÏñºÍȺ¼¯Á½ÖÖ·½·¨À´ÊµÏָ߿ÉÓÃÐÔ£¬ÖÁÓÚÊý¾Ý¿â¾µÏñ×÷ΪSQL SERVER 2005µÄÐÂÌØÐÔÖ®Ò»£¬ÎÒÔÚÇ°ÃæµÄ²©ÎÄÒѾ­×öÁ˽éÉÜ£¬½ñÌìÎÒÃǾÍÀ´¿´Ò»ÏÂȺ¼¯µÄÅäÖ÷½·¨£ºµ±È»Ëüà ......

sqlÖ®left join¡¢right join¡¢inner joinµÄÇø±ð


sqlÖ®left join¡¢right join¡¢inner joinµÄÇø±ð
left join(×óÁª½Ó) ·µ»Ø°üÀ¨×ó±íÖеÄËùÓмǼºÍÓÒ±íÖÐÁª½á×Ö¶ÎÏàµÈµÄ¼Ç¼
right join(ÓÒÁª½Ó) ·µ»Ø°üÀ¨ÓÒ±íÖеÄËùÓмǼºÍ×ó±íÖÐÁª½á×Ö¶ÎÏàµÈµÄ¼Ç¼
inner join(µÈÖµÁ¬½Ó) Ö»·µ»ØÁ½¸ö±íÖÐÁª½á×Ö¶ÎÏàµÈµÄÐÐ
¾ÙÀýÈçÏ£º
-------------------------------------------- ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ