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'
Ïà¹ØÎĵµ£º
£¨´ËƪÎÄÕÂÖ»ÐèÒªÁ˽â¼È¿ÉÒÔÁË£©
ǶÌ×±í
¶¨Ò壺ÔÚÒ»¸ö±íÖл¹°üº¬ÁíÍâÒ»¸ö×Ó±í¡£
Êý¾Ý¿âÔÚ´´½¨Êý¾Ý±íµÄʱºò¶¼ÒªÖ¸¶¨×ֶεÄÀàÐÍ£¬ËùÒÔǶÌ×±í±¾ÉíÒ²ÐèҪͬÑùÖ¸¶¨ÀàÐÍ£¬ËùÒÔÕâÖÖÀàÐÍÐèÒªµ¥¶À¶¨Òå¡£
´´½¨ÀàÐÍÓï·¨£ºcreate type project_ty as object£¨
......
¸ü¸Ä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 ......
PL/SQL-FOR UPDATE Óë FOR UPDATE OFµÄÇø±ð
url:http://hi.baidu.com/1413/blog/item/a521251f7e5993c4a686696b.html
Êý¾Ý¿â oracle for update of ºÍ for updateÇø±ð
select * from TTable1 for update Ëø¶¨±íµÄËùÓÐÐУ¬Ö»ÄܶÁ²»ÄÜд
2 select * from TTable1 wher ......
begin
for item in (select * from user_constraints a where a.constraint_type = 'R') loop
execute immediate 'alter table ' || item.table_name || ' disable constraint ' || item.constraint_name;
end loop;
end;
/ ......
Ò» Ç°Ìá
Ï£Íû×îеļͼÔÚ¿ªÍ·¸øÄãµÄ±í½¨Á¢²éѯ£º
񡜧mytable
²éѯ£ºcreate or replace view as mytable_view from mytable order by id desc ÆäÖУ¬×îºÃʹÓÃÐòÁкÅcreate sequence mytable_sequence À´×Ô¶¯Ôö¼ÓÄãµÄ¼ ......