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

±±´óÇàÄñoracleѧϰ±Ê¼Ç8 9


±í·ÖÇøά»¤£º
Ìí¼Ó·ÖÇø£º
Alter table student add partition ·ÖÇøÃû values less than(100);
ɾ³ý·ÖÇø£º
Alter table student drop partition ·ÖÇøÃû;
½Ø¶Ì·ÖÇø£º
Alter table student truncate partition ·ÖÇøÃû;
ºÏ²¢·ÖÇø£º
Alter table student merge partitions ·ÖÇøÃû,...,·ÖÇøÃû into partition зÖÇøÃû;
Éæ¼°±í·ÖÇøµÄÊý¾Ý×Öµä
User_tab_partitions
User_ind_partitions
oracleÊý¾Ý¿â¶ÔÏó
ͬÒå´Ê£º£¨Ï൱ÓÚ±ðÃû£©
Êý¾Ý¿â¶ÔÏóµÄÌæ»»Ãû³Æ
˽ÓÐ Óû§×Ô¼º´´½¨
¹«Óà DBA´´½¨¸øËùÓÐÓû§Ê¹ÓÃ
´´½¨Í¬Òå´Ê
create synonym 
ɾ³ýͬÒå´Ê
drop synonym 
°üº¬ÓйØͬÒå´ÊµÄÐÅÏ¢
user synonyms 
ÐòÁУº
ÐòÁÐÊÇÄܹ»×Ô¶¯²úÉúÁ¬ÐøΪÒÖÖƵÄÊý¾Ý¿â¹²Ïí¶ÔÏó
Óësql server²»Í¬µÄÊÇ£¬oracleÖеÄÐòÁб»³Ö¾ÃµÄ±£´æÔÚÊý¾Ý¿âµ±ÖУ¬¶ø²»ÊÇ°ó¶¨ÔÚijһÁÐÉϵÄÔ¼Êø
create sequence sequence
[increment by n]
[start with n]
[{maxvalue n | nomaxvalue}]
[{minvalue n | nominvalue}]
[{cycle | nocycle}]  --µ½×î´óֵʱºòÊÇ·ñÑ­»·
[{cache n | nocache}]; --»º´æĬÈÏΪ20
Á½¸öÖØÒªÊôÐÔ£º
nextval ·µ»ØÏÂÒ»¸ö¿ÉÓõÄÖµ
currval »ñÈ¡µ±Ç°µÄÐòÁÐÖеÄÖµ
¶ÔÓÚÒ»¸öж¨ÒåµÄÐòÁбØÐëÏÈÓÃnextval²úÉúÖµ³õʼ»¯ÐòÁУ¬²Å¿ÉÒÔÓÃcurrval·µ»Øµ±Ç°Öµ¡£
Alter Sequence ÐÞ¸ÄÐòÁж¨Òå
Drop Sequence ɾ³ýÐòÁÐ
ÐòÁеÄÊý¾Ý×Öµä
USER_SEQUENCES
ʹÓÃÐòÁÐ
²åÈëʱ£ºinsert into ±íÃû values(ÐòÁÐÃû.nextval);
²éѯÐòÁе±Ç°Öµ£ºselect ÐòÁÐÃû.currval from dual(ÃûÒå±í);
ÐòÁÐÊǹ«ÓõĶÔÏó£¬ÔÚÆäËû±íÖвåÈëÐòÁÐֵʱ»á¼ÌÐøÐòÁÐÖеÄÖµ¶ø²¢ÖØпªÊ¼£¬ÐòÁв¢²»ÊôÓÚijһÕÅ±í¡£
ÊÓͼ£º
ÐéÄâ±í£¬Ò»ÖÖ²éѯ¡£
Óï·¨£ºcreate or replace [force] view ÊÓͼÃû as
select ...
  --Èç¹ûÊÓͼ²»´æÔÚÔò´´½¨ÐÂÊÓͼ£¬·ñÔòÌæ»»Ô­ÓÐÊÓͼ
order by ×Ó¾ä¿ÉÒÔÓÃÀ´ÅÅÐò
force Ñ¡ÏîÓÃÓÚ´´½¨´øÓдíÎóµÄÊÓͼ
²éѯÒýÓò»´æÔÚµÄ±í£¬²éѯÒýÓÃÎÞЧÁУ¬´´½¨ÊÓͼʱûÓÐÏàӦȨÏÞ
oracle±íÖÐÓÐÁ½¸öÒþ²ØÁÐ rowid rownumber£¬·Ö±ð±íʾÐбêʶ·ûºÍÊä³ö½á¹û¼¯ÖеÄÐбàºÅ
Èç¹ûҪʵÏÖsql serverÖеÄtop¹Ø¼ü×Ö¹¦ÄÜ£¬¿ÉÒÔͨ¹ý×Ó²éѯ£¬È磺
select xx,xxx from
(select * from ±íÃû order by xx desc)
where rownum <=5
ÕâÑù×ӾͲé³öÁ˵¹ÐòÅÅÁÐÇ°5Ìõ¼Ç¼


Ïà¹ØÎĵµ£º

±±´óÇàÄñoracleѧϰ±Ê¼Ç1¡«2

    ÕâѧÆÚ×¼±¸»¨ÉÙÐíʱ¼äÑо¿Ò»ÏÂoracle£¬Ì¨Ê½»úµÄUbuntu²»Îȶ¨ÀÏ»µ£¬·ÅÆúÁËlinuxÉÏʹÓÃoracleµÄÏë·¨£¬ÔÚ×Ô¼º±Ê¼Ç±¾ÉÏ×°ÁËÒ»¸öoracle 10g express°æ±¾£¬Ñ§Ï°Ò»Ï¡£
    ±¾À´»¹ÏëÓÃÔƶËÐéÄ⻯һÏÂoracle£¬ÊµÑéʧ°Ü£¬ÀÏÀÏʵʵÈÃoracleÇÖÈëÎÒµÄϵͳ¡£¡£¡£囧
    °²×°Íê ......

oracle ѧϰ±Ê¼Ç

start d:\a.sql
@    d:\a.sql
edit [d:\a.sql]
spool d:\a.sql ½«ÆÁÉÏÄÚÈÝ Êä³öµ½Ö¸¶¨Îļþ
spool off
set linesize 320
set pagesize 100
set autoprint on
set serveroutput on
variable v1 refcursor 
exp imp ±¸·Ý »Ö
Ö»¶ÁÊÂÎñ
 set transaction read only
 Óô¦£¬ÉèÖà ......

±±´óÇàÄñoracleѧϰ±Ê¼Ç3


»¹ÊǽèÖúoracle sql developerÀ´²Ù×÷oracle£¬sql plus»¹ÊÇÂé·³Ò»µã¡£
¼òµ¥¿´ÁËһϣ¬Óï¾ä»ù±¾É϶¼ºÍÆäËûÊý¾Ý¿âµÄsql²î²»¶à£¬¼Ç¼һϲ»Í¬µÄµØ·½¡£
ÈÕÆÚÀàÐͱ༭
update student set stu_birthday = to_date('2010-03-06 13:14:20','yyyy-MM-dd HH24:mi:ss');
ÐèҪʹÓÃto_date()º¯Êý£¬SQLÖв»Çø·Ö´óСд£¬MMºÍmm± ......

oracleµ÷ÓÃjavaÀà±éÀú´ÅÅÌÎļþ

ÀûÓÃoracle×Ô´øµÄutl_file°ü¿ÉÒÔ·ÃÎÊ´ÅÅÌÎļþ£¬µ«ÓиöÏÞÖÆ--ÎÞ·¨·ÃÎÊÎļþ¼Ð£¿Ê²Ã´Òâ˼ÄØ£¿¾ÍÊÇ˵oracleÖ»ÄÜ·ÃÎÊÖ¸¶¨µÄÎļþ£¬¶ø²»ÄÜ·ÃÎÊÎļþ¼ÐϵÄδ֪Îļþ¡£ËùÒÔ£¬Èç¹ûҪͨ¹ýoracleÈ¥±éÀúijָ¶¨Â·¾¶ÏµÄËùÓÐÎļþ£¬sorry, impossible! µ«ÊÇ£¬ÓÐÒ»ÖÖÌæ´ú·½°¸¿ÉÒÔÖúÄãÒ»±ÛÖ®Á¦£¡
ÖÚËùÖÜÖªjavaÖ®FileÀàÖ¸ÏòµÄ¿ÉÒÔÊÇĿ¼Ҳ¿ÉÒÔÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ