所以,假设我有桌子Product
:
ProdID | ProdDesc
-----------------
1 | Widget
2 | Snikt Spring
3 | Water Bearing
和表ProdFeature
ProdID | DocID | ProdSafe | ProdShiny
-------------------------------------
1 | 34 | Y | Null
1 | 17 | Null | Y
2 | 54 | Y | Null
3 | 2 | Null | Y
我将如何得到如下结果:
ProdID | ProdSafe | SafetyDocID | ProdShiny | ShinyDocID
--------------------------------------------------------
1 | Y | 34 | Y | 17
任何帮助表示赞赏。~R