Ŀǰ ÒªÇó Çó³ö ÈËÔ± ×îºóÒ»¸öԵŤ×ÊÐÅÏ¢¡£ select a.*,b.* from emplyee a inner join salary b on b.employee_id = a.employee where max(b.month)= b.month SQL code: select * from ( select t.*, row_number() over(partition by employee_id order by month desc) rn from salary t ) where rn = 1
select sum(salary) from salary group by month having month = 3 SQL code: SELECT * from SALARY WHERE (EMPLOYEE_ID,MONTH) IN (SELECT EMPLOYEE_ID,MAX(MONTH) from SALARY GROUP BY EMPLOYEE_ID)
select a.*,b.* from emplyee a inner join salary b on b.employee_id = a.id ---¿´´í×ֶΡ£ where max(b.month)= b.month
ϸöOracle for vista °æ±¾µÄ°²×°ÊÔÊÔ 10GºÍ11GµÄ http://www.oracle.com/technology/software/products/database/index.html ------------------------------------------- ......
ÓÃPL/SQL µÇ½ʱµ¯³ö±¨´í´°¿Ú£¬´íÎóÈçÏ£¡ ORA-01034:ORACLE not available ORA-27101:shared memory realm does not exist ÇëÎÊ£¬ÓÐûÓÐÈËÓöµ½ÕâÖÖÇé¿ö£¬Ôõô½â¾ö£¿Ð»Ð»£¡