table1
number name
511 ±±¾©
512 ÉϺ£
513 ¹ãÖÝ
514 ÉîÛÚ
611 ³É¶¼
612 ÖØÇì
...
table2£¨Õâ¸öÊÇÄÚÈÝ±í£¬number¶ÔÓ¦table1µÄnumber£©
number ....
511
512
512
²éѯ½á¹û
number name count
511 ±±¾© 1
512 ÉϺ£ 2
513 ¹ãÖÝ 0
514 ÉîÛÚ 0
£¨³É¶¼ºÍÖØÇì¶¼²»Òª£¬ÒòΪËûÃÇÊÇ¡®61¡¯¿ªÍ·µÄ£©
1.Èç¹û¿ÉÒÔ£¬Çë¸øÏÂsql´úÂë
select t1.name,t1.number, sum(nvl(t2.number, 0)) count from t1, t2 where t1.number=t2.number(+) and t1.number not like '61%' group by t1.name,t1.number
select t1.name,t1.number, sum(nvl(t2.number, 0)) count from t1, t2 where t1.number=t2.number(+) and t1.number not like '61%' group by t1.name,t1.number
Õâ¸öЧÂÊÔõôÑù°¡£¿
ÒòΪtable2£¨ÄÚÈÝ±í£©ÖÐÊý¾ÝÁ¿¿ÉÄÜ»áÓеã¶à(200w×óÓҵıê×¼)
SQL code:
select distinct t1.number,t1.name,count(t2.number) over(partition by t1.name)
from table1 t1,table2 t2
where t1.number = t2.number
Ïà¹ØÎÊ´ð£º
private static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl";
private static final String USERNAME = "sys";
private static final String PASSWORD = "s ......
Á½¸öÎļþ1.PC£¬1.inc
1.PCÓвÙ×÷oracleÊý¾Ý¿âµÄ ,1.incÒ²ÓвÙ×÷oracleÊý¾Ý¿â
ÔÚÆäËûÊý¾ÝÖÐÈçinformix ÖÐ$include 1.inc¾Í¿ÉÒÔʹÓÃÁË
ÔÚORACLEÊý¾Ý¿âÖØ $include 1.inc²»¿ÉÓà EXEC SQL include 1.incÒ²²»¿É ......
ÓÃPL/SQL µÇ½ʱµ¯³ö±¨´í´°¿Ú£¬´íÎóÈçÏ£¡
ORA-01034:ORACLE not available
ORA-27101:shared memory realm does not exist
ÇëÎÊ£¬ÓÐûÓÐÈËÓöµ½ÕâÖÖÇé¿ö£¬Ôõô½â¾ö£¿Ð»Ð»£¡
1. Oracle sid ÕýÈ ......
²éÁËÒ»ÌìµÄblob£¬»¹ÊÇûÀí½âµ½£¬ÎÒÏëÔÚVCÏ´æÈ¡¶þ½øÖƵÄÎļþ£¬Ê¹ÓõÄÊÇoo4o£¬ÕÕ×ŰïÖúÎĵµÉÏÃæµÄдÁËдÈëÊý¾Ý¿âµÄ´úÂ룬»¹ÊÇûд¶Ô£¬´íÎóÌáʾÊÇthis operation is not permitted on a empty LOB£¬ÕâÊÇʲôÒâ˼°¡£¿ÕÕ ......
eclipse 3.3Æô¶¯web¹¤³Ì£¬ÒªÁ¬½Óoracle9iÊý¾Ý¿â±¨
ÑÏÖØ: Cannot create PoolableConnectionFactory (Listener refused the connection with the following error:
ORA-12518, TNS:listener could not hand off cli ......