database - writing a for loop for pl/sql to rename a column? -


this have tried, solve helpful

declare  l_sql_stmt varchar2(4000);  begin  in (select column_name all_ind_columns index_owner='ownername' , index_name='idx_name')  loop     l_sql_stmt := 'alter table tablename rename column '||i.column_name||' newname';     execute immediate l_sql_stmt; end loop; end; 


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -