1. Check the number of tables in the specified user table in the SQL statement of Oracle (provided by Koko)
Bytes ------------------------------------------------------------------------------------------------------------
Syntax:
Select * From dba_tables t where T. Owner = 'user id ';
Dba_tables: a dba with Permissions
User ID: Oracle user name
Demo:
SQLCode
- SelectCount (*)FromDba_tables tWhereT. Owner = 'Scott ';
Select count (*) from dba_tables t where T. Owner = 'Scott ';
Execution result:
Count (*)
----------
42
This 42 refers to the number of tables under the Scott user.
Bytes -------------------------------------------------------------------------------------------------------------------------
2. view the current number of login user tables (provided by butterfly)
Select table_name from user_tables
Execution result:
List table names
10 rows have been selected.
SQL code
- SelectCount (table_name)FromUser_tables
Select count (table_name) from user_tables
Execution result
Count (table_name)
-----------------
10
Extension:
Find all views, indexes, and stored procedures...
SQL code
- SelectView_nameFromUser_views
- SelectIndex_nameFromUser_indexs
Select view_name from user_viewsselect index_name from user_indexs
Some Syntax:
User_tables is used to store the table views assigned by users.
Dba_tables is used to store the table view assigned by the Administrator.
All_tables views of all tables stored in the database