Home >Database >Oracle >How to check which user a table belongs to in Oracle

How to check which user a table belongs to in Oracle

WBOY
WBOYOriginal
2022-05-18 18:14:2514726browse

Method: 1. Use the "SELECT * FROM DBA_TABLES WHERE TABLE_NAME='table name'" statement to query; 2. Use the "...WHERE OBJECT_TYPE='TABLE' and OBJECT_NAME='table name'" statement to query .

How to check which user a table belongs to in Oracle

The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.

How does oracle check which user the table belongs to

Oracle query the user the table belongs to

Method 1:

SELECT * FROM DBA_TABLES WHERE TABLE_NAME='表名';

Method 2:

SELECT * FROM ALL_OBJECTS WHERE OBJECT_TYPE='TABLE' and OBJECT_NAME='表名'

Expand knowledge:

Oracle query view belongs to the user

Method one:

SELECT * FROM ALL_VIEWS WHERE VIEW_NAME='视图名';

Method two:

SELECT * FROM ALL_OBJECTS WHERE OBJECT_TYPE='VIEW' and OBJECT_NAME='视图名'

Oracle query the user to whom the stored procedure belongs

SELECT * FROM ALL_OBJECTS WHERE OBJECT_TYPE='PROCEDURE' and OBJECT_NAME='存储过程名'

Recommended tutorial: "Oracle Video tutorial

The above is the detailed content of How to check which user a table belongs to 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