Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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·ÖÇø±íµÄ¸ÅÄî¼°²Ù×÷

´ËÎÄ´ÓÒÔϼ¸¸ö·½ÃæÀ´ÕûÀí¹ØÓÚ·ÖÇø±íµÄ¸ÅÄî¼°²Ù×÷:
        1.±í¿Õ¼ä¼°·ÖÇø±íµÄ¸ÅÄî
        2.±í·ÖÇøµÄ¾ßÌå×÷ÓÃ
        3.±í·ÖÇøµÄÓÅȱµã
        4.±í·ÖÇøµÄ¼¸ÖÖÀàÐ ......

oracleѧϰÀú³Ì

¶ÔoracleÒѾ­Ñ§Ï°Èý¸ö¶à4£¬¿ÉÒÔ²âÊÔÓÃһЩ¸´ÔÓµÄ×éºÏ£» 5£¬ËüÉú³ÉµÄ²âÊÔÓÃÀýÊÇÓм£¿ÉÑ­ÈÕ£¬¼´ÓйæÂɵ쬲»ÏñÊÖ¹¤²âÊÔÄÇÑù»áÒÅ©һЩÓÃÀýµÄ×éºÏ¡£ 3 Ñ¡ÔñOATSµÄ»ù±¾Ô­ÔòÒ»°ã¶¼ÊÇÏÈÈ·¶¨²âÊÔµÄÒòËØ¡¢Ë®Æ½ºÍ½»»¥×÷Ó㬺óÑ¡ÔñÊÊÓõÄÕý½»±í¡£ÔÚÈ·¶¨ÒòËØµÄˮƽÊýʱ£¬Ö÷ÒªÒòËØÓ¦¸Ã¶à°²Åż¸¸öˮƽ£¬´ÎÒªÒòËØ¿ÉÉÙ°²Åż¸¸öˮƽ¡£ £¨1ÖØ ......

Íæ×ªOracle£¨6£©

||-------  Î¬»¤Êý¾ÝÍêÕûÐÔ  -------||
¡¾Ô¼Êø¡¿
//Ô¼Êø
not null //·Ç¿Õ
unique  //Ψһ ²»ÄÜÖØ¸´£¬µ«¿ÉÒÔΪ¿Õ
primary key //Ö÷¼ü
foreign key //Íâ¼ü
check  //Âú×ãÌõ¼þ
//É̵êÊÛ»õϵͳ±íÉè¼Æ°¸Àý£¨1£©
//goods ÉÌÆ·±í
goodsid   ......

ʵÀý½²½âOracleÊý¾Ý¿âÉèÖÃĬÈϱí¿Õ¼äÎÊÌâ

DBAÃǾ­³£»áÓöµ½Ò»¸öÕâÑùÁîÈËÍ·ÌÛµÄÎÊÌ⣺²»ÖªµÀË­ÔÚOracleÉÏ´´½¨ÁËÒ»¸öÓû§£¬´´½¨Ê±£¬Ã»ÓиøÕâ¸öÓû§Ö¸¶¨Ä¬Èϱí¿Õ¼ä£¬ËùÒÔÕâ¸öÓû§¾Í»á²ÉÓÃĬÈϵıí¿Õ¼ä——system±í¿Õ¼ä¡£µ¼ÖÂϵͳ±í¿Õ¼äѸËÙ±»Óû§Êý¾ÝÕ¼Âú£¬Ö±ÖÁå´»ú¡£
ÔÚ10GÖУ¬DBAÓа취±ÜÃâÕâÖÖÎÊÌâÁË——ÔÚÏßÖ¸¶¨ÏµÍ³Ä¬Èϱí¿Õ¼ä£º
ALTER DAT ......

oracle pl/sqlʵÀýÁ·Ï°


µÚÒ»²¿·Ö£ºoracle pl/sqlʵÀýÁ·Ï°(1)
Ò»¡¢Ê¹ÓÃscott/tigerÓû§ÏµÄemp±íºÍdept±íÍê³ÉÏÂÁÐÁ·Ï°£¬±íµÄ½á¹¹ËµÃ÷ÈçÏÂ
empÔ±¹¤±í(empnoÔ±¹¤ºÅ/enameÔ±¹¤ÐÕÃû/job¹¤×÷/mgrÉϼ¶±àºÅ/hiredateÊܹÍÈÕÆÚ/salн½ð/commÓ¶½ð/deptno²¿ÃűàºÅ)
dept²¿Ãűí(deptno²¿ÃűàºÅ/dname²¿ÃÅÃû³Æ/locµØµã)
¹¤×Ê £½ н½ð £« Ó¶½ð
Ò²¿ÉÒÔͨ¹ý ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ