使用两个条件过滤 SSMS 中的表

Filter tables in SSMS with two conditions

是否可以过滤例如基于 or 条件的 SSMS 对象资源管理器中的表。那就是我想过滤所有有“这个”或“那个”的表(见下文)

您只能使用查询来执行此操作。

例子

USE [YourDatabase]

-- Get all tables starting with a or b, inside schema dbo.
SELECT *
FROM sys.tables t 
WHERE (t.Name LIKE 'A%'
OR t.Name LIKE 'B%')
AND t.schema_Id = schema_id('dbo')

-- Get all Tables, views, Stored procedures, and inline table valued functions starting with A

SELECT *
FROM sys.objects o
WHERE o.Name LIKE 'A%'
AND o.type IN (
    'U' -- User table
    , 'V' -- Vieww
    , 'P ' -- Stored Procedure
    , 'IF' -- Inline Table valued Functions
)