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

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.