Home >Database >SQL >How to modify table name in oracle

How to modify table name in oracle

angryTom
angryTomOriginal
2020-03-02 15:37:187034browse

How to modify table name in oracle

How to modify the table name in oracle

Method 1

alter table old_table_name rename to new_table_name;

This is the simplest (in my opinion)

Method 2:

Recommended: "SQL Tutorial"

select tname from tab;(查询的是数据库中所有的表名)
rename old_table_name to new_table_name;

rename can only modify the table under its own schema

Method 3

create  table new_table_name as select * from old_table_name;

Equivalent to copying into a new table

drop table old_table_name; 删除旧表

Method 4

Change directly in PLSQL developer.

For more oracle tutorials, please pay attention to PHP Chinese website!

The above is the detailed content of How to modify table name in oracle. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn