1 BEGIN 2 FOR c IN ( SELECT COLUMN_NAME cn FROM all_tab_columns WHERE table_name = '表名' ) 3 loop 4 BEGIN 5 execute IMMEDIATE 'alter table 表名 rename column "' || c.cn || '" to ' || c.cn; 6 EXCEPTION 7 WHEN others THEN 8 dbms_output.put_line ( '表名' || ' . ' || c.cn || ' already exists ' ); . 9 10 the END ; . 11 12 is the END Loop; 13 is the END ;
Oracle Data table fields turn uppercase lowercase
Guess you like
Origin www.cnblogs.com/luodash/p/11647612.html
Recommended
Ranking