oracle修改字段名

oracle修改字段名,在oracle9i以后

alter table [表名]  rename column 旧的字段名 to 新的字段名;

测试:

 desc TBL_MENU;
Name         Type          Nullable Default Comments
------------ ------------- -------- ------- --------
MENUID       NUMBER(20)                             
MENUNAME     VARCHAR2(32)  Y                        
EMENUNAME    VARCHAR2(64)  Y                        
PMENUID      NUMBER(20)    Y                        
DLLFILENAME  VARCHAR2(64)  Y                        
FUNCTIONNAME VARCHAR2(64)  Y                        
NOTE         VARCHAR2(255) Y                        
ISVALID      NUMBER(1)     Y        1               

SQL> alter table TBL_MENU   rename column NOTE to memoNote;

Table altered

SQL> desc TBL_MENU;
Name         Type          Nullable Default Comments
------------ ------------- -------- ------- --------
MENUID       NUMBER(20)                             
MENUNAME     VARCHAR2(32)  Y                        
EMENUNAME    VARCHAR2(64)  Y                        
PMENUID      NUMBER(20)    Y                        
DLLFILENAME  VARCHAR2(64)  Y                        
FUNCTIONNAME VARCHAR2(64)  Y                        
MEMONOTE     VARCHAR2(255) Y                        
ISVALID      NUMBER(1)     Y        1               

你可能感兴趣的:(oracle)