M.Qasim
M.Qasim

Reputation: 1878

How to find a column name in all tables of MS Access database?

I am working with a large MS Access Database with several tables. I am wondering how could I search a column from all tables in the database?

Upvotes: 1

Views: 2319

Answers (1)

JohnFx
JohnFx

Reputation: 34909

A UNION query would be one way to do it.

SELECT FieldA from Table 1 
UNION
Select FieldA from Table 2 
UNION 
Select FieldA from Table 3

Save the above as a query and then you could write another query that contains the first with whatever criteria you like.

I know this seems tedious, but that's the problem with having your data spread out so much instead of pulling it into a single table. If you can provide details on exactly what you are trying to do maybe we can give a more specific answer.

Upvotes: 1

Related Questions