Check if table exists in database

Query below finds table with specific name in Access Database. It returns one row when the table exists.

Query

select MSysObjects.name
from MSysObjects
where
   MSysObjects.type In (1,4,6)
   and MSysObjects.name = '<PUT TABLE NAME HERE>'

Columns

  • name - name if table exists

Rows

Query returns one row if table exists or none if it doesn't.

Sample results

Query returns table hr_departaments from our test database:

sample results