ORACLEÊý¾Ý¿â±íµÄ²Ù×÷
×î½üæÓÚ¹«Ë¾µÄÏîÄ¿¿ª·¢£¬ºÜ¾ÃûÓÐÀ´csdnÁË¡£½ñÌìÎÞÊ£¬ÉÏÀ´Ð´µã¶«Î÷¡£¹©´ó¼Ò²Î¿¼£¬²»¶ÔµÄµØ·½»¹Ï£Íû´ó¼ÒÅúÆÀÖ¸Õý¡£
Ò»ÏÂÊǶÔoracleÊý¾Ý¿â±íµÄһЩ²Ù×÷Óï¾ä£º
ÒѾ½¨ºÃµÄ±íÌí¼Ó×Ö¶Î
alter table Tablename add(column1 varchar2(20) default 'Y',column2 number(7,2)...)
ɾ³ý×ֶΣº
alter table Tablename drop column assessment_methods
Ϊ×Ö¶ÎÌí¼Ó×¢ÊÍ£º
comment on column bill_result.bill_no is 'Ãû´Î';
Ð޸ıíµÄ×Ö¶ÎÃû³Æ
ALTER TABLE table_name RENAME COLUMN column1 TO column2;
--Ϊ±ítablename1 µÄis_deletedÁÐÌí¼ÓĬÈÏÖµ
alter table tablename1 modify is_deleted default 'N'
Ïà¹ØÎĵµ£º
ÒÔϼ¸ÖÖÔ¼Êø ¡¢²¢ Ò»Ò»Áо٣º
1.Ö÷¼üÔ¼Êø£º
Òª¶ÔÒ»¸öÁмÓÖ÷¼üÔ¼ÊøµÄ»°£¬ÕâÁоͱØÐëÒªÂú×ãµÄÌõ¼þ¾ÍÊÇ·Ö¿Õ
ÒòΪÖ÷¼üÔ¼Êø£º¾ÍÊǶÔÒ»¸öÁнøÐÐÁËÔ¼Êø£¬Ô¼ÊøÎª£¨·Ç¿Õ¡¢²»Öظ´£©
ÒÔÏÂÊÇ´úÂë Òª¶ÔÒ»¸öÁмÓÖ÷¼ü£¬ÁÐÃûΪid,±íÃûΪemp
¸ñʽΪ£º
alter table ±í¸ñÃû³Æ add constraint Ô¼ÊøÃû³Æ Ôö¼ÓµÄÔ¼ÊøÀàÐÍ £¨ÁÐÃû£©
À ......
×°ÍêÁËOracle 10gÊý¾Ý¿â£¬ÍüÁ˸øscottÕË»§½âËø¡£Õâʱ¿ÉÒÔÔÚsql plus¹¤¾ßÀ¿ªÊ¼|ËùÓгÌÐò|<Oracle-Home>|Ó¦ÓóÌÐò¿ª·¢|SQL Plus£©£¬Ò²¿ÉÒÔÔÚ¿ØÖÆÌ¨Í¨¹ýÃüÁîÐиøscottÕË»§½âËø¡£
ÔÚµÚÒ»ÖÖÇé¿öÏ£¬ÒÔsystemÕË»§µÇ¼SQL Plus£¬È»ºóʹÓÃÃüÁî“alter user scott accoun ......
¸ü¸Äoracle Listener ÅäÖãºD:\Oracle\moon\product\11.1.0\db_1\NETWORK\ADMIN Ŀ¼֮Ï£ºListener.oraÎļþ½øÐÐÅäÖãº
# listener.ora Network Configuration File: d:\Oracle\moon\product\11.1.0\db_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SI ......
1¡¢´´½¨±í£º
create table stud(
sid int,
sname varchar2(50)
)
²¢²åÈëÒ»ÌõÊý¾Ý
&n ......
Ò» ǰÌá
Ï£Íû×îеļͼÔÚ¿ªÍ·¸øÄãµÄ±í½¨Á¢²éѯ£º
񡜧mytable
²éѯ£ºcreate or replace view as mytable_view from mytable order by id desc ÆäÖУ¬×îºÃʹÓÃÐòÁкÅcreate sequence mytable_sequence À´×Ô¶¯Ôö¼ÓÄãµÄ¼ ......