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

SQL ÃæÊÔÌâ £¨°ï½â¾ö£© - Oracle / ¿ª·¢

ÓÐÁ½¸ö±í Ò»¸öÊÇ
񡜧employee

񡜧salary


Ŀǰ ÒªÇó Çó³ö ÈËÔ± ×îºóÒ»¸öԵŤ×ÊÐÅÏ¢¡£

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



ÒýÓÃ

select a.*,b.* from emplyee a
inner join salary b on b.employee_id = a.id ---¿´´í×ֶΡ£
where max(b.month)= b.month


ÓÐÎÊÌâ 

´Ë´¦²»ÔÊÐí´¦Àí max(b.month)= b.month

SQL code:

With t As
(Select 1 eid,1 mon,10


Ïà¹ØÎÊ´ð£º

Windows 7 ÔõÑù°²×°Oracle - Oracle / »ù´¡ºÍ¹ÜÀí

¸÷λ´ó¸ç£¬°ï¸öæ¡£

ϸöOracle for vista °æ±¾µÄ°²×°ÊÔÊÔ
10GºÍ11GµÄ 
http://www.oracle.com/technology/software/products/database/index.html 
------------------------------------------- ......

oracle²¢·¢´¦ÀíSOS - Oracle / ¿ª·¢

ÎÒÔÚ¿ª·¢µÄÕâ¸öÓ¦Óò¢·¢ÐԱȽϸߣ¬oracle¸üÐÂÊý¾ÝʱºòÈçºÎ´¦Àí²¢·¢´¦ÀíÄØ£¿¸÷λ´óÏÀ·¢±íºÃµÄ¹Ûµã°¡£¬ÔÚÏߵȴý£¡
oracleÊý¾Ý¸üÐÂʱ£¬»á×Ô¶¯Ä¬ÈÏÐÐËø¶¨£¬Â¥Ö÷²»Òª²ÙÐÄ£¬Oracle¶Ô²¢Ðд¦ÀíÒѾ­ºÜ³ÉÊìÁË

ÒýÓÃ
oracle ......

oracle 9i ×î½ü·¢Ïֵǽ±¨´í - Oracle / »ù´¡ºÍ¹ÜÀí

ÓÃPL/SQL µÇ½ʱµ¯³ö±¨´í´°¿Ú£¬´íÎóÈçÏ£¡
  ORA-01034:ORACLE not available
  ORA-27101:shared memory realm does not exist
ÇëÎÊ£¬ÓÐûÓÐÈËÓöµ½ÕâÖÖÇé¿ö£¬Ôõô½â¾ö£¿Ð»Ð»£¡

1. Oracle sid ÕýÈ ......

MS SQL×÷ÒµÎÊÌâ - MS-SQL Server / Ó¦ÓÃʵÀý

ÈçºÎÔÚSQL2005ÖÐÉ趨¶¨Ê±×÷Òµ£¬±ÈÈç˵¶¨Ê±ÇåÀíijЩ±íµÄÊý¾Ý£¬
»òÕßÊǶ¨Ê±µÄ½«Ä³Ð©±íµÄÊý¾Ýµ¼³öexcel£¡
ÔÚÏߵȴý£¬¼±¼±¼±£¬×îºÃÊÇÏêϸ²½Ö裡
֮ǰÎÒ×öµÄ×÷ÒµÓеãÎÊÌ⣡
°ïUP

²Î¿¼:http://hi.baidu.com/toiota ......

ÇóÒ»SQL - MS-SQL Server / »ù´¡Àà

tab1 ×Ö¶Î:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 ×Ö¶Î:goodsid,goodskind£¨ÉÌÆ·ÀàÐÍ£©
tab3 ×Ö¶Î:goodskind£¨ÉÌÆ·ÀàÐÍ£©,kindname
½á¹û£º
µÃµ½ÉÌÆ·ÀàÐÍÔÚÒ»¶Îʱ¼ä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ