简体   繁体   English

如何在MS Access数据库的所有表中查找列名?

[英]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. 我正在使用带有多个表的大型MS Access数据库。 I am wondering how could I search a column from all tables in the database? 我想知道如何从数据库中的所有表中搜索列?

A UNION query would be one way to do it. UNION查询将是执行此操作的一种方法。

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. 如果您可以提供确切的详细信息,也许我们可以给出更具体的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM