You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过SQL语句在SQL Developer中查看所有已创建的表?

How to View All Created Database Tables in SQL Developer Using SQL Statements

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_TABLES data 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 owner column 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_ROLE or 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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.11 08:49:24