这是我的数据库的类别表中的数据
Category_Name | SubCategory_Name
Category1 | Vegetarian
Category1 | Seafood
Category1 | Lamb
Category2 | Vegetarian
Category2 | Chicken
Category3 | Non-Vegetarian
Category3 | Vegetarian
Category3 | Chicken
Category4 | Lamb/Goat
Category4 | Seafood
Category5 | Vegetarian
Category5 | Non-Vegetarian
Category6 |
Category7 | Non-Vegetarian
Category7 | Vegetarian
空白值表示“无子类别”,但这些类别的结果应显示为仅提及类别名称的行
我想写一个查询来显示这样的结果:
Category_Name | SubCategory_Name 1 | SubCategory_Name 2 | SubCategoryName3