如何通过SQL语句在SQL Developer中查看所有已创建的表?
Hey there! Let me start by clearing up a common confusion: the statements SHOW TABLES; or SHOW ALL TABLES; are not valid in Oracle SQL (which is the dialect SQL Developer is built for—these are more commonly used in databases like MySQL). If you run those in SQL Developer, you'll hit an error. Instead, use these Oracle-specific queries to list your tables:
List all tables owned by your current user
This is the most common use case—this query returns every table you've created with your logged-in account:SELECT table_name FROM user_tables;The
USER_TABLESdata dictionary view only includes tables that belong to your current session's user.List all tables you have permission to access
If you need to see tables owned by other users that you've been granted access to, use this:SELECT owner, table_name FROM all_tables;The
ownercolumn tells you which user owns each table, so you can easily distinguish between your own tables and others'.List every table in the entire database (requires DBA privileges)
If you have DBA-level access, you can view absolutely all tables across all user accounts with:SELECT owner, table_name FROM dba_tables;Note: You'll need the
SELECT_CATALOG_ROLEor DBA role to run this successfully.
As a quick side note: SQL Developer also has a graphical way to see tables—just expand the "Tables" node under your connection in the left-hand Navigator panel. But since you asked for SQL statements, the above queries are your go-to options.
内容的提问来源于stack exchange,提问作者Chandan Kumar

