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

Oracle 10g´´½¨·ÖÇø±í¼°Ë÷Òý»¯±í

http://blog.sina.com.cn/s/blog_3fed8ad60100bydo.html
 1¡¢Ê×ÏÈÀûÓÃsystemÕÊ»§´´½¨ÐµķÖÇø£º
my_space1, my_space2(ÀûÓÃÍøÒ³¿ØÖÆ̨´´½¨±í¿Õ¼äÒÔ¼°ÓôúÂë´´½¨)¡£
ÔÚʵ¼Ê¹¤×÷ÖУ¬²»Í¬µÄÇø¿ÉÒÔλÓÚ²»Í¬µÄÎïÀí´ÅÅÌÖУ¬²ÅÓÐÕæÕý·ÖÇøµÄЧ¹û¡£
È»ºó£ºÓÃscottÕÊ»§´´½¨·¶Î§·ÖÇø±í£º
create table t1(
id number(5) primary key,
name varchar2(8),
score number(3)
)
partition by range(score)
(
  partition t1_p1 values less than (60) tablespace my_space1,
  partition t1_p2 values less than (maxvalue) tablespace my_space2
);
Table created.
´´½¨Áбí·ÖÇø±í£º
create table t2(
id number(5) primary key,
name varchar2(8),
sex char(1)
)
partition by LIST(sex)
(
  partition t2_male values ('M') tablespace my_space1,
  partition t2_female values ('F') tablespace my_space2
);
Table created.
´´½¨É¢ÁзÖÇø±í£º
create table t3(
 id number,
 name varchar2(10),
 loc varchar2(13)
)
partition by hash(name)
(
 partition my_space1,
 partition my_space2
);
Table created.
»ìºÏ·ÖÇø(¸´ºÏ·ÖÇø)£º
ÏÈÁбí·ÖÇø(ÄÐ→1,2,3,4Çø)£¬ÔÙÉ¢ÁзÖÇø(4,5Çøƽ¾ù·ÖÅä)¡£
1¡¢ Ë÷Òý»¯±í
create table t2(
id number(5) primary key,
name varchar2(8),
score number(3)
)
organization index;
˵Ã÷£º¸ù¾ÝÖ÷¼ü˳Ðò(Ò²¾ÍÊÇÖ÷¼ü×ֶεÄË÷Òý˳Ðò)´æ´¢Êý¾Ý¡£
ÊʺÏÖ÷¼ü²»¶ÏÔö´óµÄ±í£¬·ñÔò²»ÒËÓá£


Ïà¹ØÎĵµ£º

oracle ±Ê¼Ç IX Ö®ÄÚÁª¡¢×óÁª¡¢ÓÒÁª

½éÉÜÒ»ÏÂÄÚÁª¡¢×óÁª¡¢ÓÒÁª
Ò».ÏÈ¿´Ò»Ð©×î¼òµ¥µÄÀý×Ó
Àý×Ó
Table A
aid adate
1 a1
2 a2
3 a3
TableB
bid bdate
1 b1
2 b2
4 b4
Á½¸ö±ía,bÏàÁ¬½Ó,Ҫȡ³öidÏàͬµÄ×Ö¶Î
select * from a inner join b on a.aid = b.bidÕâÊǽöÈ¡³öÆ¥ÅäµÄÊý¾Ý.
´ËʱµÄÈ¡³öµÄÊÇ:
1 a1 b1
2 a2 b2
ÄÇôleft join Ö¸:
select * ......

oracle ÊÓƵ±Ê¼Ç3(insert¡¢update¡¢delete)

Ò»,INSERT
1.ΪÁ˲»´òÂÒÔ­À´µÄ±íµÄÊý¾Ý,ËùÒÔ±¸·ÝÔ­À´µÄÊý¾Ý.
create table emp2 as select * from emp
create table emp3 as select * from emp
create table dept2 as select * from dept
create table salgrade2 as select * from salgrade
2.²é¿´±íµÄÉè¼ÆÇé¿ö:desc dept2;±íʾ²é¿´±ídept2µÄÉè¼ÆÇé¿ö.
3.²åÈëÊý¾Ýµ ......

oracle ʱ¼ä²î


 //¼ÆËãºÁÃë²î(Á½¸ödateÀàÐ͵ÄÏà¼õΪÌìÊý²î±ð£¬È»ºóת»»ÎªºÁÃë)
select ceil(to_date('209-11-17 13:00:12','yyyy-mm-dd hh24:mi-ss')-to_date(2009-11-18 14:00:12','yyyy-mm-dd hh24:mi-ss') )from dual;
//¼ÆËãÏà²îÔ·Ý
select (EXTRACT(year from to_date('209-11-17','yyyy-mm-dd'))-EXTRACT(year from  ......

Oracle´¥·¢Æ÷(¸ÅÄîºÍÀàÐÍ)

1.       ÒýÑÔ
 
2.       ´¥·¢Æ÷µÄ¸ÅÄîºÍÀàÐÍ
´¥·¢Æ÷ÊÇÒ»ÖÖÌØÊâµÄ´æ´¢¹ý³Ì£¬ËüÔÚ²åÈ룬ɾ³ý»òÐÞ¸ÄÌض¨±íÖеÄÊý¾Ýʱ´¥·¢Ö´ÐУ¬Ëü±ÈÊý¾Ý¿â±¾Éí±ê×¼µÄ¹¦ÄÜÓиü¾«Ï¸ºÍ¸ü¸´ÔÓµÄÊý¾Ý¿ØÖÆÄÜÁ¦¡£Êý¾Ý¿â´¥·¢Æ÷ÓÐÒÔϵÄ×÷Óãº
* °²È«ÐÔ¡£¿ÉÒÔ»ùÓÚÊý¾Ý¿âµÄÖµ ......

OracleµÄº£Á¿´æ´¢¼¼Êõ

ÏÂÎçÈ¥²Î¼ÓÒ»¸öOracleÓйغ£Á¿Êý¾Ý´æ´¢¼¼ÊõµÄÅàѵ½²×ùÁË¡£
µØÖ·ÔÚ¹ãÖÝÊÐÁÖºÍÎ÷·101ºÅÌìºÓÇø¼Æ¾­´óÂ¥Î÷²àÈýÂ¥¡£
Åàѵ·¢Æð»ú¹¹Îª£º¹ãÖÝÖÐî£ÐÅÏ¢¼¼ÊõÓÐÏÞ¹«Ë¾¡£
 
ÏÂÃæ¾Í¼òÒª×ܽáÒ»ÏÂËùÌýµ½µÄһЩ¶«Î÷£¬Ò²ËãÊÇѧµ½µÄÕâЩ¼¼Êõ¡£²»¹ýÓеĶ«Î÷²»ÖªµÀ×ܽáµÄ¶Ô²»¶Ô£¬ÔÝÇÒàñàðÍÌÔæ°É¡£
 
OracleµÄ´æ´¢¼¼Êõ
´óÌåÉÏ· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ