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

How to modify table name in oracle

angryTom
Release: 2020-03-02 15:37:18
Original
7007 people have browsed it

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;
Copy after login

This is the simplest (in my opinion)

Method 2:

Recommended: "SQL Tutorial"

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

rename can only modify the table under its own schema

Method 3

create  table new_table_name as select * from old_table_name;
Copy after login

Equivalent to copying into a new table

drop table old_table_name; 删除旧表
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template