更新时间:2023-02-26 09:58:43
尝试此查询:
这可以使用系统表sys.tables来实现.
Try this query:
This can be achieved using system table sys.tables.
USE YourDBName
GO
SELECT *
FROM sys.Tables
GO
这将返回用户创建的数据库中的所有表
或
This will return all the tables in the database which user have created
OR
--To view tables in the current schema
SELECT OBJECT_NAME FROM USER_OBJECTS WHERE OBJECT_TYPE = 'TABLE'
--To view all the tables that you have access
SELECT OBJECT_NAME FROM ALL_OBJECTS WHERE OBJECT_TYPE = 'TABLE'
--To view all the tables in the database
SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE OBJECT_TYPE = 'TABLE'
--You may use user_tables instead of user_objects.