oracleÁ·Ï°£¨mldnÊÓƵ¿Î³Ì£©Èý
×ÛºÏÁ·Ï°
ѧÉúÔ˶¯»á±ÈÈüÐÅÏ¢Êý¾Ý¿â
1£¬Ô˶¯Ô±sporter£¨Ô˶¯Ô±±àºÅsporterid£¬Ô˶¯Ô±ÐÕÃûname£¬Ô˶¯Ô±ÐÔ±ðsex£¬ËùÊôϵºÅdepartment£©
2£¬ÏîÄ¿item£¨ÏîÄ¿±àºÅitemid£¬ÏîÄ¿Ãû³Æitemname£¬ÏîÄ¿±ÈÈüµØµãlocation£©
3£¬³É¼¨grade£¨Ô˶¯Ô±±àºÅsporterid£¬ÏîÄ¿±àºÅitemid£¬»ý·Ömark£©
½¨±í
1£¬¶¨Òå¸÷¸ö±íµÄÖ÷ÂëÍâÂëÔ¼Êø
2£¬Ô˶¯Ô±µÄÐÕÃûºÍËùÊôϧ±ð²»ÄÜΪ¿ÕÖµ
3£¬»ý·ÖҪôΪ¿ÕÖµ£¬ÒªÃ´Îª6£¬4£¬2£¬0£¬·Ö±ð´ú±íµÚÒ»¶þÈýÃûµÄºÍÆäËûÃû´ÎµÄ»ý·Ö
Ô˶¯Ô±±í
1001£¬ÀîÃ÷£¬ÄУ¬¼ÆËã»úϵ
1002£¬ÕÅÈý£¬ÄУ¬Êýѧϵ
1003£¬ÀîËÄ£¬ÄУ¬¼ÆËã»úϵ
1004£¬Íõ¶þ£¬ÄУ¬ÎïÀíϵ
1005£¬ÀîÄÈ£¬Å®£¬ÐÄÀíϵ
1006£¬ËïÀö£¬Å®£¬Êýѧϵ
ÏîÄ¿±í
X001£¬ÄÐ×ÓÎåǧÃ×£¬Ò»²Ù³¡
X002£¬ÄÐ×Ó±êǹ£¬Ò»²Ù³¡
X003£¬ÄÐ×ÓÌøÔ¶£¬¶þ²Ù³¡
X004£¬Å®×ÓÌø¸ß£¬¶þ²Ù³¡
X005£¬Å®×ÓÈýǧÃ×£¬Èý²Ù³¡
»ý·Ö±í
1001£¬X001£¬6
1002£¬X001£¬4
1003£¬X001£¬2
1004£¬X001£¬0
1001£¬X003£¬4
1002£¬X003£¬6
1004£¬X003£¬2
1005£¬X004£¬6
1006£¬X004£¬4
Ô˶¯Ô±±í£º
create table sporter(sporterid number(4) primary key not null,name varchar2(50) not null,
sex varchar2(2) check (sex in('ÄÐ','Å®')),department varchar2(30) not null);
ÏîÄ¿±í£º
create table item(itemid varchar2(4) primary key not null,
itemname varchar2(50) not null,location varchar2(50) not null);
³É¼¨±í£º
create table grade(sporterid number(4),itemid varchar2(4),
constraint sporter_grade_sporterid_fk foreign key(sporterid)
references sporter(sporterid) on delete cascade,
constraint sporter_item_itemid_fk foreign key(itemid)
references item(itemid) on delete cascade,
mark number(2) check(mark in('6','4','2','0')));
²åÈëÊý¾Ý£º
Ô˶¯Ô±±í
insert into sporter values('1001','ÀîÃ÷','ÄÐ','¼ÆËã»úϵ');
insert into sporter values('1002','ÕÅÈý','ÄÐ','Êýѧϵ');
insert into sporter values('1003','ÀîËÄ','ÄÐ','¼ÆËã»úϵ');
insert into sporter values('1004','Íõ¶þ','ÄÐ','ÎïÀíϵ');
insert into sporter values('1005','ÀîÄÈ','Å®','ÐÄÀíϵ');
insert into sporter values('1006','ËïÀö','Å®','Êýѧϵ');
ÏîÄ¿±í
insert into item values('X001','ÄÐ×ÓÎåǧÃ×','Ò»²Ù³¡');
insert into item values('X002','ÄÐ×Ó±êǹ','Ò»²Ù³¡');
insert into item
Ïà¹ØÎĵµ£º
1.ORACLE²ÉÓÃ×Ô϶øÉϵÄ˳Ðò½âÎöWHERE×Ó¾ä,¸ù¾ÝÕâ¸öÔÀí,±íÖ®¼äµÄÁ¬½Ó±ØÐëдÔÚÆäËûWHEREÌõ¼þ֮ǰ, ÄÇЩ¿ÉÒÔ¹ýÂ˵ô×î´óÊýÁ¿¼Ç¼µÄÌõ¼þ±ØÐëдÔÚWHERE×Ó¾äµÄĩβ.
¡¡¡¡ÀýÈç:
¡¡¡¡(µÍЧ)
¡¡¡¡SELECT … from EMP E WHERE SAL > 50000 AND JOB = ‘MANAGER’ AND 25 < (SELECT COUNT(*) from EMP WH ......
¼ì²âËø£º
SELECT A.OWNER,
A.OBJECT_NAME,
B.XIDUSN,
B.XIDSLOT,
B.XIDSQN,
B.SESSION_ID,
B.ORACLE_USERNAME,
B.OS_USER_NAME,
B.PROCESS,
B.LOCKED_MODE,
C.MACHINE,
C.STATUS,
C.SERVER,
C.SID,
C.SERIAL#,
C.PROGRAM
from ALL_OBJECTS A,
V$LOCKED_OBJECT B,
SYS.GV_$SESSION C
WHERE ( A.OBJE ......
ÓÐÈËÓöµ½Õâôһ¸öÎÊÌ⣬·ÃÎÊÒ»¸öÐòÁÐÔõô³ö´íÁË£¬´íÎóÈçÏ£º ORA-08002: ÐòÁÐ SEQ_GX.CURRVAL ÉÐδÔڴ˻ỰÖж¨Òå ÕâÊÇÒòΪÔÚÒ»¸öеĻỰÖУ¬ÐòÁÐÐèÒª³õʼ»¯£¬Ò²¾ÍÊÇͨ¹ý.NEXTVALÀ´Íê³ÉÐòÁеijõʼ»¯¡£ ²âÊÔÈçÏ£º Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 Connected as crmii SQL> SQ ......
RAC£¬ Data Gurad£¬ Stream ÊÇOracle ¸ß¿ÉÓÃÐÔÌåϵÖеÄÈýÖÖ¹¤¾ß£¬Ã¿¸ö¹¤¾ß¼´¿ÉÒÔ¶ÀÁ¢Ó¦Óã¬Ò²¿ÉÒÔÏ໥ÅäºÏ¡£ ËûÃǸ÷×ԵIJàÖص㲻ͬ£¬ÊÊÓó¡¾°Ò²²»Í¬¡£
RAC ËüµÄÇ¿ÏîÔÚÓÚ½â¾öµ¥µã¹ÊÕϺ͸ºÔؾùºâ£¬Òò´ËRAC ·½°¸³£ÓÃÓÚ7*24 µÄºËÐÄϵͳ£¬µ«RAC ·½°¸ÖеÄÊý¾ÝÖ»ÓÐÒ»·Ý£¬¾¡¹ ......
ÈçºÎ¿´¶®ORACLEÖ´Ðмƻ®
Ò»¡¢Ê²Ã´ÊÇÖ´Ðмƻ®
An explain plan is a representation of the access path that is taken when a query is executed within Oracle.
¶þ¡¢ÈçºÎ·ÃÎÊÊý¾Ý
At the physical level Oracle reads blocks of data. The smallest amount of data read is a single Oracle block, the largest is con ......