SQL> CREATE TABLE TEST AS SELECT * from a T_User; SQL> DESC TEST name is empty? Type ----------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------ Userid NOT NULL NUMBER (38) Loginid Not Null Varchar2 (20) Name Varchar2 (20) Password Varchar2 (20) STATUS Char (1) ExpiredDate Date Memo VARCHAR2 (50) Exchangeid Not Null Number (5) PASNUMBER VARCHAR2 (20)
SQL> ALTER TABLE TEST RENAME COLUMN NAME to Name1; SQL> DESC TEST; is the name is empty? Type -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------- ------------------ Userid NOT NULL NUMBER (38) Loginid Not Null Varchar2 (20) Name1 Varchar2 (20) Password Varchar2 (20) Status Char (1) ExpiredDate Date Memo varchar2 (50) Exchangeid Not Null Number (5) PASNUMBER VARCHAR2 (20) SQL> Rename Test to Test1; SQL> DESC TEST; error: ORA-04043: Object Test does not exist
SQL> DESC TEST1 name is empty? Type ----------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------- ------ Userid Not Null Number (38) Loginid Not Null Varchar2 (20) Name1 Varchar2 (20) Password Varchar2 (20) STATUS Char (1) ExpiredDate Date Memo varcha2 (50) ExchangeId Not Null Number (5) PASNUMBER VARCHAR2 (20) SQL> SPOOL OFF