ÔÚOracle 9iÖÐÐ޸ıíµÄ½á¹¹µÄÏà¹ØsqlÓï¾ä
ÓÃsql*plus»òµÚÈý·½¿ÉÒÔÔËÐÐsqlÓï¾äµÄ³ÌÐòµÇ¼Êý¾Ý¿â£º
Ôö¼ÓÒ»¸öÁУº
ALTER TABLE ±íÃû ADD(ÁÐÃû Êý¾ÝÀàÐÍ);
È磺
ALTER TABLE emp ADD(weight NUMBER(38,0));
ÐÞ¸ÄÒ»¸öÁеÄÊý¾ÝÀàÐÍ(Ò»°ãÏÞÓÚÐ޸ij¤¶È£¬ÐÞ¸ÄΪһ¸ö²»Í¬ÀàÐÍʱÓÐÖî¶àÏÞÖÆ):
ALTER TABLE ±íÃû MODIFY(ÁÐÃû Êý¾ÝÀàÐÍ);
È磺
ALTER TABLE emp MODIFY(weight NUMBER(3,0) NOT NULL);
Demo:
ALTER TABLE PY_CCORDER ADD(
CCORD_REFUNDEDTIMES INTEGER,
CCORD_REFUNDEDAMOUNT NUMBER(15,2)
);
¸øÁиÄÃû£º
ALTER TABLE ±íÃû RENAME COLUMN µ±Ç°ÁÐÃû TO ÐÂÁÐÃû;
È磺
ALTER TABLE emp RENAME COLUMN weight TO weight_new;
ɾ³ýÒ»¸öÁУº
ALTER TABLE ±íÃû DROP COLUMN ÁÐÃû;
È磺
ALTER TABLE emp DROP COLUMN weight_new;
½«Ò»¸ö±í¸ÄÃû£º
ALTER TABLE µ±Ç°±íÃû RENAME TO бíÃû;
È磺
ALTER TABLE bouns RENAME TO bonus_new
Ïà¹ØÎĵµ£º
RAW£¬ÀàËÆÓÚCHAR£¬ÉùÃ÷·½Ê½RAW(L)£¬LΪ³¤¶È£¬ÒÔ×Ö½ÚΪµ¥Î»£¬×÷ΪÊý¾Ý¿âÁÐ×î´ó2000£¬×÷Ϊ±äÁ¿×î´ó32767×Ö½Ú¡£
LONG RAW£¬ÀàËÆÓÚLONG£¬×÷ΪÊý¾Ý¿âÁÐ×î´ó´æ´¢2G×Ö½ÚµÄÊý¾Ý£¬×÷Ϊ±äÁ¿×î´ó32760×Ö½Ú
²åÈërawÊý¾Ý²Ù×÷:
¡¡¡¡insert into raw_test values (1, ......
author:skate
time:2010-05-27
oracleÌí¼Ó×Ö¶ÎÒýÆðµÄÎÊÌâ
ÓÉÓÚͬÊÂÔÚÌí¼ÓÁ˱íµÄ×ֶκó£¬Ã»ÓÐÖØÐ±àÒëÊý¾Ý¿âµÄ¶ÔÏ󣬵¼ÖºÍÕâ¸ö±íÏà¹ØµÄºÜ¶àprocedureºÍpackage¶¼Ê§Ð§¡£
ÓÉÓÚ·¢ÏÖºóÊÇÔÚÐ޸ĺó2¸öСʱ°É£¬¶øÔÚÕâÆÚ¼äºÜ¶à³ÌÐòÔÚµ÷ÓÃÕâЩ¹ý³Ì£¬ÖÂʹºÜ¶à»á»°¶¼½©ËÀÔÚÄÇ£¬ËùÒÔÒ²ÎÞ·¨
ÔÙÖØÐ±àÒë¹ýÈ ......
¹²ÐèÒª´´½¨Á½¸öÎļþÔÚͬһ¸öĿ¼Ï£º
Ò»£º
Îļþoracle_cool_backup.bat£¬ÄÚÈÝÈçÏ£º
Remark ¶¨Òåʱ¼äÈÕÆÚ±äÁ¿
set date=%date:~0,10%
set h=%time:~0,2%
set m=%time:~3,2%
set s=%time:~6,2%
set tempvar=%date%-%h%-%m%-%s%
md "c:/temp/%tempvar%/"
echo %tempvar%
sqlplus /nolog @oracle_cool_backup.sql % ......
DBAÃǾ³£»áÓöµ½Ò»¸öÕâÑùÁîÈËÍ·ÌÛµÄÎÊÌ⣺²»ÖªµÀËÔÚOracleÉÏ´´½¨ÁËÒ»¸öÓû§£¬´´½¨Ê±£¬Ã»ÓиøÕâ¸öÓû§Ö¸¶¨Ä¬Èϱí¿Õ¼ä£¬ËùÒÔÕâ¸öÓû§¾Í»á²ÉÓÃĬÈϵıí¿Õ¼ä——system±í¿Õ¼ä¡£µ¼ÖÂϵͳ±í¿Õ¼äѸËÙ±»Óû§Êý¾ÝÕ¼Âú£¬Ö±ÖÁå´»ú¡£
ÔÚ10GÖУ¬DBAÓа취±ÜÃâÕâÖÖÎÊÌâÁË——ÔÚÏßÖ¸¶¨ÏµÍ³Ä¬Èϱí¿Õ¼ä£º
ALTER DAT ......
/*
¹¦ÄÜ£ºÀûÓú¯Êý´´½¨Á÷Ë®ºÅÈ磺
fx201005260001,
fx201005260002,
fx201005270001
×÷Õߣº³ÂÓÀ½¨
´´½¨Ê±¼ä£º2010-05-26
*/
use master
go
i ......