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

ORACLEÍâÁ¬½Ó

         ½ñÌ쿪·¢¹ý³ÌÖÐÓöµ½ÁËÒ»¸öºÜÂé·³µÄÍâÁ¬½ÓµÄÎÊÌ⣬µ½×îºó¶¼Ã»ÓÐÕÒµ½ºÜºÃµÄ½â¾ö·½·¨£¬×îºóÖ»ÄÜÓÃunion all ʵÏÖÁË£¬ËäÈ»ÐÔÄܲ»±ÈÍâÁ¬½Ó£¬µ«ÖÁÉÙÍØÕ¹ÁËÍâÁ¬½ÓµÄ¾ÖÏÞÐÔ¡£ Ê×Ïȸø³öÎÒ²âÊÔÓõÄÈý¸ö±íºÍÊý¾Ý£¨×óÓÒÍâÁ¬½ÓµÀÀíÊÇÒ»ÑùµÄ£¬ÎÒÖ»×ܽáÁË×óÁ¬½Ó£©£º KC21±í£º create table KC21
(
AKB020 VARCHAR2(14) not null,
AKC190 VARCHAR2(18) not null,
AAC001 VARCHAR2(20) not null
);
INSERT INTO KC21 (AKB020, AKC190, AAC001) VALUES('110', '266', '1302012062942');
INSERT INTO KC21 (AKB020, AKC190, AAC001) VALUES('456', '369', '1302012063210');
INSERT INTO KC21 (AKB020, AKC190, AAC001) VALUES('1000', '472', '1302012045811');
INSERT INTO KC21 (AKB020, AKC190, AAC001) VALUES('123', '335', '1302012063275');
KC24񡜧
create table KC24
(
AKB020 VARCHAR2(14) not null,
AKC190 VARCHAR2(18) not null,
AAE072 VARCHAR2(20) not null
);
insert into KC24 (AKB020, AKC190, AAE072)values ('110', '335', '2188038055');
insert into KC24 (AKB020, AKC190, AAE072)values ('11', '369', '2188038092');
insert into KC24 (AKB020, AKC190, AAE072)values ('1000', '472', '2188038197');
insert into KC24 (AKB020, AKC190, AAE072)values ('110', '339', '2188038058');
KB01񡜧
create table KB01
(
AKB020 VARCHAR2(14) not null,
AKB021 VARCHAR2(50)
);
insert into KB01 (AKB020, AKB021)values ('1000', 'ÌÆɽʵʱ²âÊÔÒ½Ôº');
insert into KB01 (AKB020, AKB021)values ('110', 'ÌÆɽ´óÒ½ÔºA');
insert into KB01 (AKB020, AKB021)values ('123', 'ÌÆɽ´óÒ½ÔºB');
insert into KB01 (AKB020, AKB021)values ('456', 'ÌÆɽ´óÒ½ÔºC');
insert into KB01 (AKB020, AKB021)values ('11', 'ÌÆɽ´óÒ½ÔºD');
oracle¹Ù·½ÌṩÁËÁ½ÖÖ·½À´ÊµÏÖÍâÁ¬½Ó£¬Ò»ÖÖÊÇÔÚfrom×Ó¾äÖÐʹÓÃleft outer join/right outer join/full outer join£¬ÁíÍâÒ»ÖÖÊÇ
ÔÚwhere×Ó¾äÖÐʹÓôó¼Ò¶¼±È½ÏÊìϤµÄ·ûºÅ¡°(+)¡±,ÕâÀïÎÒÏëдһÏÂÎÒ¶ÔÕâÁ½¸ö·½·¨µÄÀí½â¡£
Ò»¡¢Ê¹ÓÃÒ»¸öÁ¬½ÓÌõ¼þµÄÍâÁ¬½Ó£º

SQL> select * from kc21 left outer join kc24 on kc21.akb020=kc24.akb020;

AKB020 AKC190 AAC


Ïà¹ØÎĵµ£º

oracle ±í¿Õ¼ä²Ù×÷

oracle±í¿Õ¼ä²Ù×÷Ïê½â
  1
  2
  3×÷Õߣº   À´Ô´£º    ¸üÐÂÈÕÆÚ£º2006-01-04 
  5
  6 
  7½¨Á¢±í¿Õ¼ä
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

Oracle±í¿Õ¼ä¹ÜÀí

extent--×îС¿Õ¼ä·ÖÅ䵥λ --tablespace management
block --×îСi/oµ¥Î»      --segment    management
create tablespace james
datafile '/export/home/oracle/oradata/james.dbf'
size 100M ¡¡¡¡¡¡¡¡¡¡¡¡--³õʼµÄÎļþ´óС¡¡
autoextend On¡¡¡¡¡¡¡¡ --×Ô¶¯Ôö³¤
next 10M¡ ......

Oracle ²éѯ²¢É¾³ýÖظ´¼Ç¼µÄSQLÓï¾ä


²éѯ¼°É¾³ýÖظ´¼Ç¼µÄSQLÓï¾ä
1¡¢²éÕÒ±íÖжàÓàµÄÖظ´¼Ç¼£¬Öظ´¼Ç¼ÊǸù¾Ýµ¥¸ö×ֶΣ¨peopleId£©À´ÅжÏ
select * from people
where peopleId in (select   peopleId from   people group by   peopleId having count(peopleId) > 1)
 
2¡¢É¾³ý±íÖжàÓàµÄÖظ´¼Ç¼£¬Öظ´¼Ç¼ÊÇ ......

OracleÄÚ´æ·ÖÅ佨Òé


¹ØÓÚSGAÉèÖõÄÒ»µã×ܽá
±¾×ܽ᲻Õë¶ÔÌØÀý£¬½ö¶Ô·þÎñÆ÷Ö»´æÔÚOS + ORACLE ΪÀý£¬Èç¹û´æÔÚÆäËûÓ¦ÓÃÇë×ÃÇ鿼ÂÇ
дÕâ¸öÒ²ÊÇÒòΪ½üÀ´ÕâÖÖÖظ´ÐÔµÄÎÊÌâ·¢ÉúµÄÌ«¶àËùµ¼ÖµÄ
Ê×ÏȲ»ÒªÃÔÐÅSTS,SG,OCP,EXPERT µÈ¸ø³öµÄÈκν¨Òé¡¢ÄÚ´æ°Ù·Ö±ÈµÄ˵·¨
»ù±¾ÕÆÎÕµÄÔ­ÔòÊÇ£¬ data buffer ͨ³£¿ÉÒÔ¾¡¿ÉÄܵĴó£¬shared_pool_size ÒªÊÊ¶È ......

oracle¸ù¾ÝÍâ¼üÃû²é¹ØÁªµÄ±í

1¡¢²éÕÒ±íµÄËùÓÐË÷Òý£¨°üÀ¨Ë÷ÒýÃû£¬ÀàÐÍ£¬¹¹³ÉÁУ©£º
select t.*,i.index_type from user_ind_columns t,user_indexes i where t.index_name = i.index_name and t.table_name = i.table_name and t.table_name = Òª²éѯµÄ±í
2¡¢²éÕÒ±íµÄÖ÷¼ü£¨°üÀ¨Ãû³Æ£¬¹¹³ÉÁУ©£º
select cu.* from user_cons_columns cu, user_constr ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ