Вопрос

SQL> select * from dba_hr_tables;
 select * from dba_hr_tables  
               * ERROR at line 1: ORA-00942: table or view does not exist.

Please help me out to find all table contain in HR User ... Thanks.

Это было полезно?

Решение

If I understand the question correctly, you're looking for all the tables owned by user HR.

If you have a user with system privileges, you could use the following:

SELECT table_name
FROM   dba_tables
WHERE  owner = 'HR'

If you don't. but have a user with privileges on HR's tables, you could use all_tables instead of dba_tables:

SELECT table_name
FROM   all_tables
WHERE  owner = 'HR'

Alternatively, if you're able to logon as the HR user, you could do so and use:

SELECT table_name
FROM   user_tables

Другие советы

Edit the below to use your tables name. check your spelling as well!

SELECT *
    FROM tablename
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top