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

ÈçºÎÔÚOracleÖи´ÖƱí½á¹¹ºÍ±íÊý¾Ý


1. ¸´ÖƱí½á¹¹¼°ÆäÊý¾Ý£º
create table table_name_new as select * from table_name_old
2. Ö»¸´ÖƱí½á¹¹£º
create table table_name_new as select * from table_name_old where 1=2;
»òÕߣº
create table table_name_new like table_name_old
3. Ö»¸´ÖƱíÊý¾Ý£º
Èç¹ûÁ½¸ö±í½á¹¹Ò»Ñù£º
insert into table_name_new select * from table_name_old
Èç¹ûÁ½¸ö±í½á¹¹²»Ò»Ñù£º
insert into table_name_new(column1,column2...) select column1,column2... from table_name_old


Ïà¹ØÎĵµ£º

oracleѹÁ¦²âÊÔÖ®orabm

Êý¾Ý¿âѹÁ¦²âÊÔ
Ò»¡¢ÓÃorabm²âÊÔÊý¾Ý¿âCPU
Orabmͨ¹ýÔÚÓû§Ö¸¶¨µÄ²¢·¢ÏÂÔËÐÐÖ¸¶¨ÊýÁ¿µÄÊÂÎñÀ´²âÊÔϵͳÐÔÄÜ.ËüÖ÷Òª²âÊÔÊý¾Ý¿â·þÎñÆ÷µÄCPUÐÔÄܺÍÄÚ´æ¡£
orabmʵ¼ÊÉÏÊÇÒ»¶ÑsqlµÄ¼¯ºÏ¡£
orabm¿ÉÒÔÓÃÔÚlinux/windows/solarisÏÂʹÓá£
orabm²»Ò»¶¨ÐèÒªÔËÐÐÔÚÊý¾Ý¿âËùÔÚ·þÎñÆ÷ÉÏ£¬Ëü¿ÉÒÔÔËÐÐÔÚÈκΰ²×°ÁË9i¿Í»§¶ËµÄÖÕ¶ËÉÏ¡£Äã ......

OracleÊý¾Ý¿âµÄÆÕͨǨÒÆ·½·¨

ÔÚÏàͬ²Ù×÷ϵͳ»·¾³Ï£¬Ïàͬ°æ±¾OracleÊý¾Ý¿âµÄǨÒƱȽϼòµ¥¡£
 
´óÖ²½Ö裺
1¡¢È·¶¨Ô´»úµÄ²Ù×÷ϵͳÀàÐͺͰ汾£¬Ô´»úÖ÷»úÃû£»Oracle°æ±¾£¬°²×°Ä¿Â¼£¬SID¡£
±¾ÀýÖУ¬Ô´»úΪ£º  Win2k Adv£¬ ywxt£¬Oracle v8.17,  d:\oracle, orcl
Ä¿±ê»úΪ£ºWin2003£¬ywxt£¬Oracle v8.17,  d:\oracle, orcl
  ......

¸ü¸ÄOracleÊý¾Ý¿â±íµÄ±í¿Õ¼ä

ÔÚOracleÊý¾Ý¿â¹ÜÀíϵͳÖУ¬´´½¨¿â±í£¨table£©Ê±Òª·ÖÅäÒ»¸ö±í¿Õ¼ä£¨tablespace£©£¬Èç¹ûδָ¶¨±í¿Õ¼ä£¬ÔòʹÓÃϵͳÓû§È·Ê¡µÄ±í¿Õ¼ä¡£
ÔÚOracleʵ¼ÊÓ¦ÓÃÖУ¬ÎÒÃÇ¿ÉÄÜ»áÓöµ½ÕâÑùµÄÎÊÌâ¡£´¦ÓÚÐÔÄÜ»òÕßÆäËû·½ÃæµÄ¿¼ÂÇ£¬ÐèÒª¸Ä±äij¸ö±í»òÕßÊÇij¸öÓû§µÄËùÓбíµÄ±í¿Õ¼ä¡£Í¨³£µÄ×ö·¨¾ÍÊÇÊ×ÏȽ«±íɾ³ý£¬È»ºóÖØн¨±í£¬ÔÚн¨±íʱ½«± ......

oracleÖе÷Óôø²ÎÊýµÄ´æ´¢¹ý³Ì

create or replace procedure proc_test
( a in number, b out number )
as
begin
b:=a+1;
end    proc_test;
ÏÖÔÚÒªµ÷ÓõĻ°¾ÍÊÇÕâÑù
SQL> c number;
SQL>exec proc_test(1,:c);
ǧÍòҪעÒâ±ðÍüÁËдðºÅ ......

Oracle SQLÓÅ»¯¼¼ÇÉ

ÎÒ¾õµÃÖ÷ÒªÓ¦¸Ã´Ó5¸ö·½Ãæ½øÐе÷Õû£º
1.È¥µô²»±ØÒªµÄ´óÐͱíµÄÈ«±íɨÃè
2.»º´æСÐͱíµÄÈ«±íɨÃè
3.¼ìÑéÓÅ»¯Ë÷ÒýµÄʹÓÃ
4.¼ìÑéÓÅ»¯µÄÁ¬½Ó¼¼Êõ
5.¾¡¿ÉÄܼõÉÙÖ´Ðмƻ®µÄCost
ÏÖÔÚ¼òµ¥µÄ¾Ù¼¸¸öÀý×Ó
Where×Ó¾äÖÐÓГ!=”½«²»Ê¹ÓÃË÷Òý
select account_name from test where amount != 0  (²»Ê¹ÓÃ) ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ