SQL / Access可以将外键行显示为列吗? [英] Can SQL/Access display foreign key rows as columns?
本文介绍了SQL / Access可以将外键行显示为列吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个MS Access表有一个多对一的关键到另一个,我想查询显示在一行中的这些项目。例如,Foo,Bar和Baz链接到ID为1的行,所以我想显示:
I have an MS Access table that has a many-to-one key to another one, and I would like a query to display those items in one row. For example, Foo, Bar and Baz link to the row with ID 1, so I would like to display:
1 | Foo | Bar | Baz
而不是
instead of
1 | Foo
1 | Bar
1 | Baz
推荐答案
查看Access的PIVOT TRANSFORM。 b $ b我认为这是你将需要的。
Look at Access's PIVOT TRANSFORM.
I think that is what you will need.
这篇关于SQL / Access可以将外键行显示为列吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文