Can SQL/Access display foreign key rows as columns?

左心房为你撑大大i 提交于 2019-12-11 17:20:02

问题


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

回答1:


Look at Access's PIVOT TRANSFORM.
I think that is what you will need.



来源:https://stackoverflow.com/questions/965981/can-sql-access-display-foreign-key-rows-as-columns

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!