How get Tables from current Session/User

I'm struggling to get tables of given username or current session/user; I'm able to get all tables by using select table_name from all_tables; but it also retrieve default created tables. I just want tables that we created.

Even when I retrieve tables from Pluggable database it also fetch all tables(default-tables-with-$-sign-name) but when I connect pluggable-user in ORACLE SQL DEVELOPER then it just show (user-created)tables without default tables.

I want all queries that show tables,users without default($ sign name) table,users; for sqlplus. I'm using ORACLE-12C.

Answers


Just filter on the owner:

select table_name from all_tables where owner='YOUR OWNER NAME';

You could query the view [DBA|ALL|USER]_TABLES depending on the privilege you have.

Querying USER_TABLES would provide all the tables owned by the current owner you have logged into.

For example,

SQL> show user
USER is "LALIT"
SQL> SELECT table_name FROM user_tables;

TABLE_NAME
--------------------------------------------------------------------------------

no rows selected

SQL> create table t(a number);

Table created.

SQL> SELECT table_name FROM user_tables;

TABLE_NAME
--------------------------------------------------------------------------------
T

While using DBA/ALL you must filter the OWNER in UPPER CASE.

For example,

SQL> show user
USER is "SYS"
SQL> SELECT table_name FROM dba_tables WHERE OWNER='LALIT';

TABLE_NAME
--------------------------------------------------------------------------------
T

Need Your Help

struggling on getting XML from database to show on the form on a table or grid

c# asp.net sql-server linq

I have been truing to retrieve XML data that I have stored in an XML field in sql server and now i need to show information in a webpage/form as to give the user information about the stored report...

Javascript sorting listbox works unless in a table IE8

javascript sorting internet-explorer-8

I have a function that, when the user selects one or more items, it moves those items to the top of the list box (still selected) and scrolls to the top so they're visible. It works in all major