mysql - Rename multiple tables with single command -
it's possible mysql mentioned here:
https://www.electrictoolbox.com/rename-multiple-tables-mysql/
does similar action possible oracle ?
something :
alter table tbl1 rename new1, tbl2 new2;
an alternative think of can generate multiple alter commands using single select all_tables.
select 'alter table ' ||table_name ||' rename ' ||table_name ||'_new' ||rn||';' alter_command (select rownum rn , a.* all_tables table_name in ('<list_of_tables>') ) order table_name; output:
alter table abcd_tmp rename abcd_tmp_new1509; alter table abcd_tmp3 rename abcd_tmp3_new1510; alter table access$ rename access$_new46; alter table account rename account_new1549; alter.. ..... wiki
Comments
Post a Comment