oracle ±í½á¹¹µÄÐÞ¸Ä
oracle ±í½á¹¹µÄÐÞ¸Ä
½ñÌì×ܽáϹØÓÚ±íµÄÐÞ¸Ä,·ÀÖ¹ÒÔºóÍü¼Ç,ºÃ¼ÇÐÔ²»ÈçÀñÊÍ·Âð!!!
¸ü¸Ä±íµÄ½á¹¹
1.±à¼±íµÄ×Ö¶Î
ÐÞ¸ÄÒ»¸öÁеÄÊý¾ÝÀàÐÍ(Ò»°ãÏÞÓÚÐ޸ij¤¶È£¬ÐÞ¸ÄΪһ¸ö²»Í¬ÀàÐÍʱÓÐÖî¶àÏÞÖÆ):
Óï·¨:
ALTER TABLE ±íÃû MODIFY(ÁÐÃû Êý¾ÝÀàÐÍ);
eg1:
alter table skate_test modify (author number(10,0) )
ÔÚÐÞ¸ÄÁеij¤¶Èʱºò,Ö»Äܱ༱ÈÏÖÓÐ×Ö¶Îʵ¼Ê´æµÄ³¤¶È»¹Òª´ó,·ñÔòÌáʾÏÂÃæµÄ´íÎó:
ORA-01441: ÎÞ·¨¼õСÁ㤶È, ÒòΪһЩֵ¹ý´ó
eg2:
alter table skate_test modify (author varchar2(10) )
ÔÚÐÞ¸ÄÁеÄÊý¾ÝÀàÐ͵Äʱºò,ËùÐ޸ĵÄÁбØÐëΪ¿Õ,·ñÔòÌáʾÏÂÃæµÄ´íÎó:
ORA-01439: Òª¸ü¸ÄÊý¾ÝÀàÐÍ, ÔòÒªÐ޸ĵÄÁбØÐëΪ¿Õ
2.Ôö¼ÓÒ»¸öÁÐ
Óï·¨:
ALTER TABLE ±íÃû ADD(ÁÐÃû Êý¾ÝÀàÐÍ);
eg1£º
ALTER TABLE skate_test ADD(author NUMBER(38,0) not null);
3.¸øÁиÄÃû£º
Óï·¨:
ALTER TABLE ±íÃû RENAME COLUMN µ±Ç°ÁÐÃû TO ÐÂÁÐÃû;
eg1£º
ALTER TABLE skate_test RENAME COLUMN author TO authorer_new
4.ɾ³ýÒ»¸öÁÐ
Óï·¨:
ALTER TABLE ±íÃû DROP COLUMN ÁÐÃû;
eg1£º
alter table skate_test drop column author
5.½«Ò»¸ö±í¸ÄÃû
Óï·¨:
ALTER TABLE µ±Ç°±íÃû RENAME TO бíÃû;
eg1£º
alter table skate_test rename to test_sakte
5.¸ø±í¼Ó×¢ÊÍ
comment column on ±íÃû.ÁÐÃû is '×¢ÊÍÄÚÈÝ'; //Ð޸ıíµÄÁеÄ×¢ÊÍ
COMMENT ON TABLE MOVO_NEW.TEST_SAKTE IS '×¢ÊÍÄÚÈÝ'; //Ð޸ıíµÄ×¢ÊÍ
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/wyzxg/archive/2008/02/28/2129166.aspx
Ïà¹ØÎĵµ£º
Ê×ÏȲéÕÒÄ¿±êÓû§µÄµ±Ç°½ø³Ì£º
select sid,serial# from v$session where username='ERP';
²éѯ½á¹û£º
sid serial#
222 123
122 233
Ç¿ÐжϿªÓû§Á¬½Ó£º
alter system kill session 'sid,serial';
ÀýÈ磺
alter system kill session '222,123';
......
Ò» Oracle¹«Ë¾¼ò½é
OracleÊÇÒóÐæ³öÍÁµÄ¼×¹ÇÎÄ(oracle bone inscriptions)µÄÓ¢ÎÄ·ÒëµÄµÚÒ»¸öµ¥´Ê
Oracle¹«Ë¾ÊÇÈ«Çò×î´óµÄÐÅÏ¢¹ÜÀíÈí¼þ¼°·þÎñ¹©Ó¦ÉÌ£¬³ÉÁ¢ÓÚ1977Ä꣬×ܲ¿Î»ÓÚÃÀ¹ú¼ÓÖÝ Redwood shore
Oracle¹«Ë¾ÒòÆ临ÔӵĹØϵÊý¾Ý¿â²úÆ·¶øÎÅÃû¡£OracleµÄ¹ØϵÊý¾Ý¿âÊÇÊÀ½çµÚÒ»¸öÖ§³ÖSQLÓïÑÔµÄÊý¾Ý¿â
OracleÔÚ³¬¹ý ......
ÖйúµçÁ¦ÐÐҵĿǰÕýÔÚ¾Àúמ޴óµÄ±ä»¯£º´Ó¹ú¼Ò°ìµçµ½ÆóÒµ°ìµç£¬ÐγÉÁ˶à¼Ò¾ºÕù°ìµçµÄ¸ñ¾Ö£»³§Íø·Ö¿ª¡¢¾º¼ÛÉÏÍø£¬´Ó¼Æ»®µ½Êг¡×ª¹ì£¬ÒýÈë¶àÖÖ¾¼Ã³É·Ö£»´ÓµØÓòÐÔ·ÖÉ¢¹©µçÏò´óµçÍø·¢Õ¹£»´ÓÕþÆó²»·Öµ½ÕþÆó·Ö¿ª¡£ÕâЩ±ä»¯£¬Ê¹ÖйúµÄµçÁ¦ÐÐÒµ¾ÊÜ×ÅÇ°ËùδÓеÄѹÁ¦¡£
Ò»·½Ã棬2003Äê¹úÄڵķ¢µçÆóÒµÖØиÄ×é£ ......
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
/**
* ´Ë´¦²åÈëÀàÐÍ˵Ã÷¡£
* ´´½¨ÈÕÆÚ£º(2001/11/30 14:55 ......
ÏîÄ¿ÖÐÐèҪʹÓõ½°´¹æÔòÉú³ÉÐòÁкţ¬¿ªÊ¼µÄ½â¾ö°ì·¨ÊǸù¾ÝÌõ¼þÈ¡µÃ×î´óIDºÅ½øÐзֽâ+1Ôٺϲ¢µÄ½â¾ö·½°¸£¬ºóÀ´·¢ÏÖÈç¹ûÁ½¸ö¿Í»§Í¬Ê±²Ù×÷µÄʱºò³öÏÖÎÊÌ⣺Ìí¼ÓµÄʱºòIDÒѾ´æÔÚ£¬ÔÒòÊÇ£ºAÓû§ÔÚ·ÃÎÊÈ¡µÃµÚMAX(N)¼Ç¼deID£¬µ«ÊÇ»¹Ã»ÓнøÐÐÔö¼Ó²Ù×÷£¬Õâʱ£¬BÓû§Ò²È¡µÃµÚMAX(N)¼Ç¼deID£¬ÕâÊÇ£Á½øÐÐÌí¼Ó²Ù×÷ͬʱ£¬£ÂҲͬʱ½øÐÐ ......