Link to home
Start Free TrialLog in
Avatar of parameter
parameter

asked on

delete/rename column in oracle 8i

hello guys,
is it possible for me to delete or rename the column name in the table (oracle 8i). if that possible, can anyone give the idea on how to do it.

TQ
Avatar of patelgokul
patelgokul

You can rename a column using the CREATE TABLE command with the AS clause. For example, the following statement re-creates the table STATIC, renaming a column from OLDNAME to NEWNAME:

CREATE TABLE temporary (newname, col2, col3)
    AS SELECT oldname, col2, col3 FROM static
DROP TABLE static
RENAME temporary TO static;

ASKER CERTIFIED SOLUTION
Avatar of jpkemp
jpkemp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
try this:

alter table <table_name> rename column <old> to <new>;
Note: The "rename column" syntax will work in Oracle 9i, not 8i.
And then only in 9.2 not in 9.0.1.