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

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
0
There are no comments. Click here to write the first comment.