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

How to determine whether a table exists in oracle

hzc
hzcOriginal
2020-06-09 11:17:309105browse

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));

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');

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');

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!

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