如下表,希望修改first_name字段名字为fname:
SQL> desc dept80
Name Null? Type
----------------------------------------- -------- --------------
EMPLOYEE_ID NUMBER(6)
LAST_NAME NOT NULL VARCHAR2(10)
ANNSAL NUMBER
HIRE_DATE NOT NULL DATE
JOB_ID VARCHAR2(9)
FIRST_NAME DATE
sql> alter table dept80 rename column first_name to fname;
成功后:
SQL> desc dept80;
Name Null? Type
----------------------------------------- -------- --------------------
EMPLOYEE_ID NUMBER(6)
LAST_NAME NOT NULL VARCHAR2(10)
ANNSAL NUMBER
HIRE_DATE NOT NULL DATE
JOB_ID VARCHAR2(9)
FNAME DATE
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) | Powered by Discuz! X3.2 |