如何在数据字典中修改Oracle的表列名

如题所述

查系统表、数据字典之类的拼sql来执行呗
oracle:

1
2
3

select 'alter table '||c.table_name||' rename column '||c.column_name||' to D;'
from user_tab_columns c
where c.column_name in ('A','B','C')

sqlserver:

1
2
3

select 'execute sp_rename "'+t.name+'.'+c.name+'", D' from sys.tables t
inner join sys.columns c on t.object_id=c.object_id
where c.name in ('A','B','C')

其他数据库的话,自己改改语句呗
温馨提示:答案为网友推荐,仅供参考