This content has been marked as final. Show 3 replies
user11995934 wrote:There is no such option in Oracle.
how to rename multiple columns in a table using single query ?
Hi,1 person found this helpful
Not possible with single command but you can use this command to supply the values you want:
ALTER TABLE [my_table_name]
RENAME COLUMN [current_column_name] TO [new_column_name];
ALTER TABLE emp
RENAME COLUMN f_name TO first_name;
You can use this like this:
ALTER TABLE &TABLE_NAME RENAME COLUMN &COLUMN_NAME TO &NEWCOLUMN_NAME;
Now supply as many values as you can.Hope it helps.
a single queryA single command you mean.
DBMS_REDEFINITION might help you, but it wouldn't be a single command.