Home > Database > Oracle > How to determine whether a table exists in oracle

How to determine whether a table exists in oracle

hzc
Release: 2020-06-09 11:17:30
Original
9116 people have browsed it

How to determine whether a table exists in oracle

Oracle method to determine whether a table exists:

1. Open the plsql client and log in to the oracle database;

How to determine whether a table exists in oracle

2. Create a test table,

create table test_exists(id number, value varchar2(20));
Copy after login

How to determine whether a table exists in oracle

3. Write sql, insert into the oracle system view, and query whether the newly created table exists,

select * from user_tables t where table_name= upper('test_exists');
Copy after login

You can see that there are query results, which means that the table exists;

How to determine whether a table exists in oracle

4. On the contrary, write sql to query whether the test_exists2 table Exists, because no result is returned, the table does not exist;

select * from user_tables t where table_name= upper('test_exists2');
Copy after login

How to determine whether a table exists in oracle

## Recommended tutorial: "

Oracle Tutorial"

The above is the detailed content of How to determine whether a table exists 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