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

oracleÖеÄÊÓͼ


create table a(
id number primary key,
name varchar2(20)
);
create table b(
id number,
name varchar2(20),
aid number references a(id)
);
insert into a values(1,'1');
insert into b values(1,'aaa',1);
Èç¹û create view vi_new as select * from a
ÔÚÊÓͼvi_new ÉÏ×öÈκΠdml²Ù×÷¶¼»áÐÞ¸Ä ¶ÔÓ¦µÄ»ù±íÖеÄÊý¾Ý
ÒòΪÊÓͼ¾ÍÊÇÒ»¸öÖ¸Õë
²âÊÔ Èô¹ûdrop table »ù±í  ÊÓͼͬʱҲ»á±¨´í ˵Ã÷ ÊÓͼ²»Êǵ¥¶À´æÔÚµÄ ¶øÊÇÖ¸Ïò»ù±íµÄ
Èç¹û create view vi_new as select t.a,s.name from A t,B s where t.a=s.id
ÕâÑù¾ÍÖ»ÄܽøÐвéѯ²Ù×÷ÁË  ½øÐÐÔöɾ¸Ä¾Í»áÅÜ´í
ÊÓͼµÄÓŵã
      1.¶ÔÊý¾Ý¿âµÄ·ÃÎÊ£¬ÒòΪÊÓͼ¿ÉÒÔÓÐÑ¡ÔñÐÔµÄÑ¡È¡Êý¾Ý¿âÀïµÄÒ»²¿·Ö¡£ 
      2.Óû§Í¨¹ý¼òµ¥µÄ²éѯ¿ÉÒÔ´Ó¸´ÔÓ²éѯÖеõ½½á¹û¡£ 
      3.ά»¤Êý¾ÝµÄ¶ÀÁ¢ÐÔ£¬ÊÔͼ¿É´Ó¶à¸ö±í¼ìË÷Êý¾Ý¡£ 
      4.¶ÔÓÚÏàͬµÄÊý¾Ý¿É²úÉú²»Í¬µÄÊÓͼ¡£ 


Ïà¹ØÎĵµ£º

OracleÖжà±í²éѯÔÙ°´Ê±¼äµ¹Ðò

ÎÒÔÚ¹¤×÷ÖÐÔÚOracleÖжà±í²éѯÔÙ°´Ê±¼äµ¹Ðòʱ£¬ÓÃorder by ±íÃû.datatime desc ×ÜÊÇʵÏÖ²»ÁË¡£
²»¹ý×îºóÎÊÑî¾é×îºóºÍÎÒ˵¿ÉÒÔ°ÑÎÒÃDzéѯµÄ×ܸösqlÓï¾ä×öΪһ¸ö±íÀ´ÅÅÐò£º
select rownum,aa.* from (....  order by ±íÃû.datatime desc ) aa ......

´´½¨oracle dblink

create database link user_auth
¡¡¡¡ connect to user_auth identified by user_auth
¡¡¡¡ using  '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.236)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=develop1)))'; ......

Àí½âoracleÖÐÁ¬½ÓºÍ»á»°

Àí½âoracleÖÐÁ¬½ÓºÍ»á»° 1. ¸ÅÄͬ£º¸ÅÄͬ£º
Á¬½ÓÊÇÖ¸ÎïÀíµÄÍøÂçÁ¬½Ó¡£
ÔÚÒѽ¨Á¢µÄÁ¬½ÓÉÏ£¬½¨Á¢¿Í»§¶ËÓëoracleµÄ»á»°£¬ÒÔºó¿Í»§¶ËÓëoracleµÄ½»»¥¶¼ÔÚÒ»¸ö»á»°»·¾³ÖнøÐС£
2. ¹ØϵÊǶà¶Ô¶à£º
Ò»¸öÁ¬½ÓÉÏ¿ÉÒÔ½¨Á¢0¸ö£¬1¸ö£¬2¸ö£¬¶à¸ö»á»°¡£
OracleÔÊÐí´æÔÚÕâÑùµÄ»á»°£¬¾ÍÊÇʧȥÁËÎïÀíÁ¬½ÓµÄ»á»°¡£
3. ¸ÅÄîÓ¦Ó㺸 ......

Oracle²âÊÔ´æ´¢¹ý³ÌÁ½ÖÖ·½Ê½

ÔÚ³õѧOracleʱ£¬Ð´ÁËÒ»¸ö´æ´¢¹ý³Ì£¬Ãû³ÆÊÇ£ºPROC_GET_BILL£¬Èý¸ö²ÎÊý£¬µÚ1£¬3ÊÇin²ÎÊý£¬µÚ2ÊÇout²ÎÊý£¬Ð´ÍêÖ®ºó£¬Ïë²âһϣ¬½á¹û·¢ÏÖÍøÉÏÓжàÖÖ·½Ê½£¨ÆäÖØÒªÊÇÏÂÃæÕâÁ½ÖÖ£¬Ö»ÊÇд·¨²»Í¬¶øÒÑ£©£¬¸Õ¿ªÊ¼°ÑÁ½ÖÖ±äÁ¿¶¨Ò巽ʽ¸ã´íÁË£¬Ò»Ö±Ö´Ðв»¹ý£¬¾­ÂýÂý³¢ÊÔ£¬µÃµ½ÁËÏÂÃæÁ½ÖÖд·¨£¬Ï£ÍûÏñÎÒÕâÑù³õѧÕßÉÙ×ßÍä·£¬Ö±½Ó¸ãÇåÁ½ÖÖ· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ