到这个时候,我正在实现一个在 3 个表之间执行匹配的系统,我现在真的需要你的帮助,假设我有以下三个表:
表1:名称与物品的关系
User Item
=====================
John Doe Apple
John Doe Orange
John Doe Cat
John Doe Dog
John Doe Fish
Anna Sue Apple
Anna Sue Orange
Robinson Banana
Robinson Vessel
Robinson Car
表 2:对项目进行分类
Item Type Item
==================
Fruit Apple
Fruit Orange
Fruit Banana
Animal Cat
Animal Dog
Vehicle Vessel
Vehicle Car
Vehicle Truck
表3:项目匹配
Match ID Item Type
======================
M001 Fruit
M001 Animal
M002 Fruit
M002 Vehicle
所有我想问的是,我如何只能向所有用户显示具有与指定匹配 ID 完全匹配的所有条件的
用户对于这种情况,用户John Doe满足在匹配 ID中指定的关系中在水果和动物中具有项目的所有条件格式如下:
User Match ID Item Type Item
================================================
John Doe M001 Fruit Apple
John Doe M001 Fruit Orange
John Doe M001 Animal Cat
John Doe M001 Animal Dog
Robinson M002 Fruit Banana
Robinson M002 Vehicle Vessel
Robinson M002 Vehicle Car
非常感谢所有解决方案,因此感谢您的帮助。