Find tables with names with specific prefix

Query below finds tables which names start with specific prefix, e.g. tables with names starting with 'hr'.

Note that you can also do it in VBA

Query

select MSysObjects.name
from MSysObjects
where
   MSysObjects.type In (1,4,6)
   and MSysObjects.name like 'hr*'
order by MSysObjects.name

Columns

  • name - name of found table

Rows

  • One row represents a table
  • Scope of rows: all found tables
  • Ordered by table name

Sample results

Query returns names of all tables that starts with "hr"

sample results