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

½ñÌìµÄoracleÃæÊÔÌâ2 - Oracle / »ù´¡ºÍ¹ÜÀí

ÓÐÒ»ÕűíA,ÊôÐÔid,name,extend,ÆäÖÐextend×Ö¶ÎΪ¿Õ£¬Ò»ÕűíC,ÊôÐÔid ,extend,c.extend²»Îª¿Õ,
ÆäÖбíC.idÊDZíA.id×Ó¼¯¡£ÏÖÔÚÐèҪʹÓÃSQLʵÏÖÕâÑùµÄ¹¦ÄÜ
Èç¹ûA.id = C.id ÄÇô a.extend = c.extend ·ñÔò a.extend = 0 £¿

select a.id,a.name,a.extend
from a,c
where a.id=c.id and a.extend = c.extend
union all
select a.id,a.name,a.extend
from a,c
where a.extend = 0 and not exists(select 1
from c where a.id=c.id)

select A.id,nvl(A.extend,0) from A,C where A.id = C.id(+)

¶Ô£¬ÓÃnvlµÄ£¬Â¥Ö÷Ã÷°×µÄ

ÒýÓÃ
select a.id,a.name,a.extend
from a,c
where a.id=c.id and a.extend = c.extend
union all
select a.id,a.name,a.extend
from a,c
where a.extend = 0 and not exists(select 1
from c where a.id=c.id)


²»ºÃÒâ˼£¬ÎÒûÓÐ˵Ã÷°×£¬a.extend = c.extend ·ñÔò a.extend = 0 ÊǸ´ÖƵÄÒâ˼£¬¾ÍÊǰÑc.extend¸³Öµ¸øa.extend.

ÒýÓÃ
ÓÐÒ»ÕűíA,ÊôÐÔid,name,extend,ÆäÖÐextend×Ö¶ÎΪ¿Õ£¬Ò»ÕűíC,ÊôÐÔid ,extend,c.extend²»Îª¿Õ,
ÆäÖбíC.idÊDZíA.id×Ó¼¯¡£ÏÖÔÚÐèҪʹÓÃSQLʵÏÖÕâÑùµÄ¹¦ÄÜ
Èç¹ûA.id = C.id ÄÇô a.extend = c.extend ·ñÔò a.extend = 0 £¿

SQL code:


select a.id,a.name,nvl2(a.extend,0)
from a,c
where a.id=c.id




ÒýÓÃ
select A.id,n


Ïà¹ØÎÊ´ð£º

oracle·þÎñ״̬ÏÔʾ ¡°Í£Ö¹¡±

ÎÒÊÇÓÃÔ¶³Ì×ÀÃæÁ¬²Ù×÷·þÎñÆ÷ÉϵÄÊý¾Ý¿â¡£
ÔÚ´´½¨Ò»¸öÓû§Ö®ºó£¬ÔÙÓÃPLSQLµÇ¼£¬ÔòPLSQLËÀµôÁË¡£
ÎҹصôPLSQLÖ®ºó£¬ÓÃÆäËûÓû§Ò²²»ÄܵǼ¡£

ÎÒ°ÑoracleµÄ·þÎñÍ£Ö¹£¬½á¹û¾ÍÊÇoracleµÄ·þÎñ״̬¾ÍÍ£ÁôÔÚ¡°Í ......

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

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

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

oracle³õѧÕßÄãÇë½Ì - Oracle / »ù´¡ºÍ¹ÜÀí

--½¨Á¢Ò»¸ö°üÒÔ¶¨ÒåÒ»¸öÓαê
create or replace package PK_test 
as 
type cur_test is ref cursor;
end PK_test;
--½¨Á¢Ò»¸ö¹ý³Ì,ͨ¹ýÊäÈëJOBID£¬·µ»ØÒ»¸ö±í¼Ç¼£¨Óα꣩!
create or replace ......

·ÖÏí×Ô¼ºµÄOracleÅäÖùý³Ì - Oracle / »ù´¡ºÍ¹ÜÀí

Ð»Ð»ÌÆÈËÀÏ´óµÄÖ¸µã£¬Ð»Ð»¸÷λ¸ßÊÖµÄÖ¸µã£¡
°²×°10g Enterprise¡£ÉÏÍøÏÂÁËMLDNµÄOracleÊÓÆµ£¬¸ú×ÅÊÓÆµÉϵÄÅäÖÃ×ߣ¬°²×°³É¹¦ÁË£¬µ«ÊÇûÍêÕûµØÅäÖá£
µã»÷½øÈ룺Database Configuration Assistant
1. ´´½¨Êý¾Ý¿â£» ......

OracleÖв鿴×Ô¼º´´½¨µÄ±í - Oracle / ¸ß¼¶¼¼Êõ

Ôõôͨ¹ýÃüÁî²é¿´×Ô¼ºÒѾ­´´½¨µÄ±í£¿
select tname from tab;

SQL code:

--1.sysÓû§µÇ¼
select table_name
from dba_indexes
where table_owner = 'Óû§Ãû';
--2.ËùÓÐÓû§
select * from tab; ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ