Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Knowing how to check whether a column is an identity column for Microsoft SQL Server, I currently still found no solution for doing the same with SQL for a Microsoft Access database.

My question:

How can I check with SQL whether a column is an identity column for a Microsoft Access database?

(Since I want to do it in my code, an ADO.NET solution would be helpful, too, although it seems, that this is not possible)

share|improve this question

Are you just wanting to see if the column is an identity of find the identity column in the table. If so try something like this and just extend the criteria

SELECT AS [TableName],
    c.Name AS [ColumnName],
    sys.tables t
    INNER JOIN sys.columns c
        ON t.object_id = c.object_id
WHERE c.is_identity = 1
share|improve this answer
Are you sure that Microsoft Access has the sys.tables and sys.columns? When I try your suggestion, Access complains about missing database "sys.mdb". – Uwe Keim Oct 16 '13 at 7:38
No. Msysobjects is a system table in Access. – msi77 Oct 17 '13 at 5:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.