ÔÚoracleÖйØÓÚÊ÷µÄsql
±ítask£¬×Ö¶Îid_£¬name_
id_µÄÊý¾ÝÈçÏÂÐÎʽ£º
1
1.1
1.1.1
1.1.1.2
1.2
1.2.1
...
10
10.1
10.1.1
10.2.1
10.2.1.1
10.2.1.1.1
10.2.1.1.2
.......
×¢£º“.”±êʶ¸¸×ӵĹØÏµ¡£
ÏÖÔÚͨ¹ýid_²éѯÊ÷½á¹¹µÄЧ¹û£¬²¢ÇÒÖªµÀ´Ë½ÚµãÊÇ·ñΪҶ×Ó½Úµãleaf¡£¡££¿
Óï¾äÈçÏ£º
select
id_ ,
name_ ,
(select count(id_) from task where t.id_= substr(id_,0,INSTR((id_),'.',-1)-1) ) as leaf,connect_by_isleaf from task t
start with t.id_ ='5' connect by prior
t.id_= substr(t.id_,0,INSTR((t.id_),'.',-1)-1) order by t.id_
Ïà¹ØÎĵµ£º
SQLµÄÓÅ»¯Ó¦¸Ã´Ó5¸ö·½Ãæ½øÐе÷Õû£º
1.È¥µô²»±ØÒªµÄ´óÐͱíµÄÈ«±íɨÃè
2.»º´æÐ¡ÐͱíµÄÈ«±íɨÃè
3.¼ìÑéÓÅ»¯Ë÷ÒýµÄʹÓÃ
4.¼ìÑéÓÅ»¯µÄÁ¬½Ó¼¼Êõ
5.¾¡¿ÉÄܼõÉÙÖ´Ðмƻ®µÄCost
SQLÓï¾ä£º
ÊǶÔÊý¾Ý¿â(Êý¾Ý)½øÐвÙ×÷µÄΩһ;¾¶£»
ÏûºÄÁË70%~90%µÄÊý¾Ý¿â×ÊÔ´£»¶ÀÁ¢ÓÚ³ÌÐòÉè¼ÆÂß¼£¬Ïà¶ÔÓÚ¶Ô³ÌÐòÔ´´úÂëµÄÓÅ»¯£¬¶ÔSQLÓï¾äµÄÓÅ»¯Ô ......
·½·¨Ò»£º
1) ²é¿´·þÎñÆ÷¶Ë×Ö·û¼¯£º &nbs ......
´Ó¸ÅÄʾÀý—Oracle´´½¨³ÌÐò°ü
Ò»¡¢³ÌÐò°üµÄÏà¹ØÖªÊ¶
1.¶¨ÒåÓë˵Ã÷
a. Ïà¹Ø¶ÔÏóµÄ·â×°
b. ³ÌÐò°üµÄ¸÷²¿·Ö
- ³ÌÐò°ü¹æ¸ñ˵Ã÷
ÉùÃ÷×Ó³ÌÐò
- ³ÌÐò°üÖ÷Ìå
......
There are lots of problems with Oracle DATE & TIMESTAMP and their
counterpart Java classes since they do not directly compare. DATE fields
in Oracle will give date & time where a ......
ȨÏÞ¹ÜÀí
Oracle 9i
3¸öĬÈÏÓû§
sys(³¬¼¶¹ÜÀíÔ±) ĬÈÏÃÜÂ룺change_on_install
system£¨ÆÕͨ¹ÜÀíÔ±£©
ĬÈÏÃÜÂ룺manager
scott£¨ÆÕͨÓû§£© ĬÈÏÃÜÂ룺tiger
Oracle 10g
sys£¨ÃÜÂëÔÚ°²×°Ê±ÉèÖã©
system£¨ÃÜÂëÔÚ°²×°Ê±ÉèÖã©
scott(ĬÈÏËø¶¨£¬ÏëÓõýâËø)
Æô¶¯Windo ......