码迷,mamicode.com
首页 > 数据库 > 详细

oracle中修改表名

时间:2016-10-27 18:50:37      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:修改   drop   test   alt   ora   修改表   命令   acl   creat   

<<<备忘>>>
 
answer1:
ALTER TABLE old_table_name RENAME TO new_table_name;(大写为系统命令)
answer2:
SQL> select tname from tab ;
TNAME
------------------------------
TEST
 
SQL> rename test to temp ;
Table renamed.
 
SQL> select tname from tab ;
TNAME
------------------------------
TEMP
rename只能修改自己schema下面的表。
answer3:
create new_table as select * from old_table;drop table old_table;

oracle中修改表名

标签:修改   drop   test   alt   ora   修改表   命令   acl   creat   

原文地址:http://www.cnblogs.com/toSeeMyDream/p/6004917.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!