SQL·Ö×éÅÅÐò
½ñÌìÓöµ½¸öÓÐÒâ˼µÄÎÊÌ⣬ÊÇÒ»¸ö·Ö×éÅÅÐòµÄÎÊÌ⣬²»¹ýÒªÇó·Ö×éºÍ·Ö×é¼äÒ²ÒªÅÅÐò£¬Èç¹ûÕâ¸ö×éÄÚÓÐÒ»ÌõÊý¾ÝÊÇ×î½ü¸üеģ¬ÄÇôÕâÕû¸ö×é¶¼Ó¦¸ÃÅÅÔÚÇ°Ãæ¡£
ÏÂÃæÒÔOracleµÄHRʾÀýSchemaÖеÄemployees±íΪÀý£º
Óï¾ä°´²¿ÃÅ·Ö×飬·Ö×éÖ®¼äµÄÅÅÐòÊÇÕâÑùµÄ£ºÈç¹ûÕû¸ö·Ö×éÖÐÓÐÒ»¸öÔ±¹¤µÄhire_dateÊÇ×îеģ¬ÄÇôÕâ¸ö·Ö×é¾ÍÓ¦¸ÃÅÅÔÚÆäËû·Ö×éµÄÇ°Ãæ¡£·Ö×éÄÚ²¿µÄÅÅÐòÒ²Êǰ´ÕÕhire_dateÀ´Åŵġ£
SQLÓï¾äÈçÏ£¬ÔÚOracle 10g XEÖÐͨ¹ý²âÊÔ
SELECT oe.department_id, oe.employee_id, oe.last_name,oe.hire_date,sq.maxd
from employees oe JOIN
(
SELECT e.department_id,max(e.HIRE_DATE) maxd
from employees e
GROUP BY e.department_id
ORDER BY maxd desc
) sq
ON oe.department_id=sq.department_id
ORDER BY sq.maxd desc,oe.hire_date
Ïà¹ØÎĵµ£º
¸Õ¸Õ¸ßÖеÄһλͬѧÎÊÎÒÒ»µÀ±ÊÊÔÌ⣺Çë¼òÊöSQL×¢Èëʽ¹¥»÷¼°ÆäÔÀí¡£
£¨Q£º¹¥»÷£¿ÄѵÀÊÇ×öºÚ¿ÉÂ𣿣¿£©
¿ÉÒÔ°ÑÕâÖÖÐÐΪÀí½â³ÉºÚ¿ÍÐо¶£¬ÒòΪÕâÑù×öµÄÄ¿µÄ¾ÍÊÇ¡°·Ç·¨»ñÈ¡¡±¡£
£¨Q£ºÔõô×ö£¿£©
¿ÉÒÔ°´ÕÕÎÒÏÂÃæµÄ²½ÖèÒ»²½Ò»²½À´£¬´ó¼ÒÒ²¾Íµ±Ò»»Ø¡°ºÚ¿Í¡±ÁË¡££¨P.S. Õâ¿ÉÊÇÎÒ¡°¶À¼ÒÑÐÖÆ¡± ......
<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå" ......
3¡£±íÄÚÈÝÈçÏÂ
-----------------------------
ID LogTime
1 2008/10/10 10:00:00
1 2008/10/10 10:03:00
1 2008/10/10 10:09:00
2 ¡ ......
[¿ÉÓÃ]Èç¹û³öÏÖ°²×°sql server 2000ÒªÇóCD-KEYµÄÇé¿ö,ÇëʹÓÃregedt32ÕÒ¿ª×¢²á±í,ÔÚÒÔÏÂÖ÷¼ü[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]Öн¨Á¢Ò»¸öDWORD¼ü
SafeDLLSearchMode²¢ÉèֵΪ0
Õâ¸öÊÔ¹ý£¬ÊÇ¿ÉÒÔÓõÄ
H6TWQ-TQQM8-HXJYG-D69F7-R84VM - ......
´ó¼ÒºÃ£¡×î½üÓÖÓÐÁËһЩģ¿éÓ÷¨µÄÐĵã¬ÄǾÍÊÇÀûÓÃÄ£¿éʹÄãµÄÄÚ´æ±ä³ÉÒ»¸öÐéÄâµÄÊý¾Ý¿âģʽ£¬Ê¹Äã¿ÉÒÔÔÚûÓÐÊý¾Ý¿âµÄÇé¿öÏ£¬½«txtÎļþµÄÊý¾Ý½øÐÐ sqlÓï¾ä´¦Àí£¬¸Ð¾õºÜÐÂÏʰɣ¬²»¹ýÕâ¸ö²»Óøе½¾ªÑÈ£¬PerlÒ»Ö±ÊǺÜÍêÃÀµÄ£¬¹þ¹þ£¬ÄÇÎÒÃǾÍÀ´¿´¿´Õâ¸öÉñÆæ°É£¡
ÐèÒª°²×° Ä£¿é£º
SQl::Library;
DBI
ÏÂÃæÊdzÌÐò ......