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

oracle ÐÞ¸Ä×Ö¶ÎÀàÐ͵ķ½·¨

½ñÌ칫˾ÒòΪҵÎñÐèÒª,ÐÞÒªÐÞ¸Äij¸ö×Ö¶ÎÊý¾ÝÀàÐÍÓÐnumber(5),±äΪnumber(5,2)ÐÍ
ÒªÊÇûÓÐÊý¾ÝµÄ»°Ö±½ÓÓÃÒÔÏÂÓï¾ä¼´¿É
alter   table  tb_test  modify permile  number(5,2);
µ«ÊÇÓÐÊý¾ÝµÄ»° ¾Í²»ÄÜÓÃÉÏÃæ·½·¨ÁË,
alter table tb_test add permile_temp number(5,2)
update tb_test set  permile_temp=permile;
alter table drop column permile;
alter  table test rename column  permile_temp to permile;
ÕâÖÖ·½·¨»áʹÁÐÃû·¢Éú±ä»¯,¶øÇÒ×Ö¶Î˳ÐòÔö¼Ó ÓпÉÄÜ·¢ÉúÐÐÇ¨ÒÆ,¶ÔÓ¦ÓóÌÐò»á²úÉúÓ°Ïì
ÒÔÏ·½·¨ÊDZȽϺõķ½·¨
²»ÓÃʹÁÐÃû·¢Éú±ä»¯ Ò²²»»á·¢Éú±íÇ¨ÒÆ,µ«Õâ¸öÓиöȱµãÊDZíÒª¸üÐÂÁ½´Î
Èç¹ûÊý¾ÝÁ¿½Ï´óµÄ»° ²úÉúµÄundoºÍredo¸ü¶à ,ǰÌáÒ²ÊÇҪͣ»ú×ö
ÒªÊDz»Í£»úµÄ»° ,Ò²¿ÉÒÔ²ÉÓÃÔÚÏßÖØ¶¨Ò巽ʽÀ´×ö 
ÒÔÏÂÊǽű¾:
-- Ìí¼ÓÒ»¸öÁÙʱÁÐpermile_temp ÀàÐÍΪ number
alter table tb_test  add permile_temp number;
-- ÉèÖÃÒª¸Ä¶¯µÄÁÐpermile ¿ÉÒÔΪNULL
alter table  tb_test  modify  permile null;
-- °Ñpermile ÁеÄֵȫ²¿¸üиøÁÙʱÁÐpermile_temp£¬È»ºó°Ñ permile ¸üÐÂΪNULL
update  tb_test  set permile_temp=permile,permile=null;
commit;
-- °ÑÁÐÄ¿±êÁÐ permile Êý¾ÝÀàÐ͸Ķ¯Îªnumber(5,2)
alter table  tb_test  modify permile number(5,2);
-- °Ñpermile ÁеÄֵȫ²¿¸üлØÀ´£¬È»ºó°Ñ ÁÙʱÁÐ ¸üÐÂΪNULL
update  tb_test  set permile=permile_temp,permile_temp=null;
commit;
 -- ×îºóɾ³ýÌí¼ÓµÄÁÙʱÁÐ
alter table  tb_test  drop column permile_temp;
-- ×îºó»¹Ô­ÁÐ permile ²»ÔÊÐíΪNULL
alter table  tb_test  modify permile not null;
select * from  tb_test ;
 
 


Ïà¹ØÎĵµ£º

OracleÐÔÄÜÓÅ»¯ÓëDelphi´úÂë

OracleÐÔÄÜÓÅ»¯ÓëDelphi´úÂë

¸ÕѧÁ˵ãoracle·½ÃæµÄ֪ʶ£¬¸Ð¾õÒÔǰд´úÂëֻƾϲºÃд£¬ÍêȫûÓÐÉԵÓÉ£¬µ¼ÖÂÔÚÄÚÐÐÈË¿´À´£¬Ð´µÄ¶¼ÊÇÀ¬»ø´úÂ룬ÏÖÔھͰÑѧµ½µÄһЩ¶«Î÷д³öÀ´£¬Ò²ËãÊǸø¸ÕÈëÃŵÄÅóÓÑÒ»µã°ïÖú°É¡£
ÒÔǰ£¬Ð´Êý¾Ý¿â·ÃÎÊ´úÂ룬¸Ð¾õºÜ¼òµ¥£¬²»¾ÍÊÇsqlÓï¾äÂËùÒÔʲôÓï¾ä¶¼ÊÇÕâÑùд£º
A£º
 
......

oracleÆô¶¯ÃüÁî

1¡¢startup nomount
·Ç°²×°Æô¶¯£¬ÕâÖÖ·½Ê½Æô¶¯Ï¿ÉÖ´ÐУºÖؽ¨¿ØÖÆÎļþ¡¢Öؽ¨Êý¾Ý¿â¶ÁÈ¡init.oraÎļþ£¬Æô¶¯instance£¬¼´Æô¶¯SGAºÍºǫ́½ø³Ì£¬ÕâÖÖÆô¶¯Ö»ÐèÒªinit.oraÎļþ¡£
2¡¢startup mount dbname
°²×°Æô¶¯£¬ÕâÖÖ·½Ê½Æô¶¯Ï¿ÉÖ´ÐУº
Êý¾Ý¿âÈÕÖ¾¹éµµ¡¢
Êý¾Ý¿â½éÖʻָ´¡¢
ʹÊý¾ÝÎļþÁª»ú»òÍÑ»ú£¬
ÖØÐ¶¨Î»Êý¾ÝÎļþ¡¢Ö ......

oracleµÄ×óÓÒÁ¬½Ó

¶Ô×óÁ¬½Ó¡¢ÓÒÁ¬½ÓµÄÒÉ»óµÃµ½½â¾ö¡£
ÔÚOracle PL-SQLÖУ¬×óÁ¬½ÓºÍÓÒÁ¬½ÓÒÔÈçÏ·½Ê½À´ÊµÏÖ
²é¿´ÈçÏÂÓï¾ä£º
SELECT emp_name, dept_name
FORM Employee, Department
WHERE Employee.emp_deptid(+) = Department.deptid
      ´ËSQLʹÓÃÁËÓÒÁ¬½Ó£¬¼´“(+)”ËùÔÚλÖõÄÁíÒ»²àΪÁ¬½Óµ ......

oracle µ¼Èëµ¼³ö¹æÔò

Ò»¡¢Á¬½Ó¹æÔò£¬Ò»ÇвÙ×÷µÄǰÌá¡£ µÍ°æ±¾¿Í»§¶ËÄܹ»Á¬½Óµ½Í¬Ñù°æ±¾»òÕ߸ü¸ß°æ±¾µÄ·þÎñÆ÷ÉϽøÐÐimpºÍexp²Ù×÷¡£ ¸ß°æ±¾¿Í»§¶Ë²»ÄÜÁ¬½Óµ½µÍ°æ±¾µÄ·þÎñÆ÷ÉϽøÐÐimp»òÕßemp²Ù×÷¡£ ¶þ¡¢»ìºÏʹÓùæÔò£¬Ç°ÌáÊÇÒªÂú×ãÁ¬½Ó¹æÔò¡£ µÍ°æ±¾exp³öµÄdmpÎļþ£¬Óø߰汾Äܹ»imp½øÈ¥¡£ ¸ß°æ±¾exp³öµÄdmpÎļþ£¬µÍ°æ±¾µÄimp¹¤¾ß² ......

Oracle PL/SQL±à³Ì¹æ·¶Ö¸ÄÏ

Ò»¡¢PL/SQL±à³Ì¹æ·¶Ö®´óСд
¾ÍÏñÔÚSQLÖÐÒ»Ñù£¬PL / SQLÖÐÊDz»Çø·Ö´óСдµÄ¡£ÆäÒ»°ã×¼ÔòÈçÏ£º
¹Ø¼ü×Ö(BEGIN, EXCEPTION, END, IF THEN ELSE,LOOP, END LOOP)¡¢Êý¾ÝÀàÐÍ(VARCHAR2, NUMBER)¡¢ÄÚ²¿º¯Êý(LEAST, SUBSTR)ºÍÓû§¶¨ÒåµÄ×Ó³ÌÐò(procedures, functions,packages)£¬Ê¹Óôóд¡£
±äÁ¿ÃûÒÔ¼°SQLÖеÄÁÐÃûºÍ±íÃû£¬Ê¹ÓÃÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ