Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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¶àÐмǼºÏ²¢/Á¬½Ó/¾ÛºÏ×Ö·û´®µÄ¼¸ÖÖ·½·¨

ʲôÊǺϲ¢¶àÐÐ×Ö·û´®£¨Á¬½Ó×Ö·û´®£©ÄØ£¬ÀýÈ磺
SQL> desc test;
Name     Type          Nullable Default Comments
------- ------------ -------- ------- --------
COUNTRY VARCHAR2(20) Y       &nb ......

oracle¿Í»§¶ËplsqlÉèÖÃ(win7)

oracle¿Í»§¶ËplsqlÉèÖÃ(windows7)  ÔÚwindows7°²×°plsqlÒÔ·ÃÎÊ·þÎñÆ÷ÉϵÄoracleÊý¾Ý¿â
1. ÔÚ¹ÙÍøÏÂÔØoracle database 10g client£¬°²×°Ê±Ñ¡Ôñinstant client£¬°´Ä¬ÈÏÉèÖð²×°
2. °²×°»òʹÓÃÂÌÉ«°æµÄplsql
3. ÔÚplsqlĿ¼ÏÂÕÒµ½(»òн¨)Îļþtnsnames.ora£¬¿ÉÖØ¸´Ìí¼ÓÈçÏ¶Σº
MYNAME =
(DESCRIPTION =
(ADDRESS_L ......

ʵÀý¶Ô±ÈOracleÖÐtruncateºÍdeleteµÄÇø±ð

ʵÀý¶Ô±ÈOracleÖÐtruncateºÍdeleteµÄÇø±ð
ɾ³ý±íÖеÄÊý¾ÝµÄ·½·¨ÓÐdelete,truncate,
ËüÃǶ¼ÊÇɾ³ý±íÖеÄÊý¾Ý,¶ø²»ÄÜɾ³ý±í½á¹¹,delete ¿ÉÒÔɾ³ýÕû¸ö±íµÄÊý¾ÝÒ²¿ÉÒÔɾ³ý±íÖÐijһÌõ»òNÌõÂú×ãÌõ¼þµÄÊý¾Ý,¶øtruncateÖ»ÄÜɾ³ýÕû¸ö±íµÄÊý¾Ý,Ò»°ãÎÒÃǰÑdelete ²Ù×÷ÊÕ×÷ɾ³ý±í,¶øtruncate²Ù×÷½Ð×÷½Ø¶Ï±í.
truncate²Ù×÷Óëdelete²Ù× ......

Oracle ÖеÄto_date()º¯Êý


to_date()Óë24Ð¡Ê±ÖÆ±íʾ·¨¼°mm·ÖÖÓµÄÏÔʾ£º
Ò»¡¢ÔÚʹÓÃOracleµÄto_dateº¯ÊýÀ´×öÈÕÆÚת»»Ê±£¬ºÜ¶àJava³ÌÐòÔ±Ò²Ðí»áÖ±½ÓµÄ²ÉÓÓyyyy-MM-dd
HH:mm:ss”µÄ¸ñʽ×÷Ϊ¸ñʽ½øÐÐת»»£¬µ«ÊÇÔÚOracleÖлáÒýÆð´íÎ󣺓ORA 01810 ¸ñʽ´úÂë³öÏÖÁ½´Î”¡£
È磺select to_date('2005-01-01 13:14:20','yyyy-MM-d ......

Íæ×ªOracle£¨5£©

||-------  Êý¾Ý¿â¹ÜÀí  -------||
//ÏÔʾ³õʼ»¯²ÎÊý
show parameter;
//Êý¾Ý¿â±íµÄÂß¼­±¸·ÝÓë»Ö¸´
//µ¼³ö
1.µ¼³ö±í
exp userid=scott/tiger@ORCL tables=(emp) file=d:\e1.dmp
2.µ¼³öÆäËû·½°¸µÄ±í£¬Ê×ÏÈҪȷÈÏ×Ô¼ºÊÇsysdbaÉí·Ý
exp userid=system@919959ORCL tables=(scott.emp) file=d:\e1.d ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ