您好,我对 MySql 有点生疏,有人可以帮我解决这个问题吗?
问题:我有以下表格:


我需要得到一个 Result:APINAME和DESCRIPTION( ENDPOINTfrom APIStable) where USER_ID(from subscriptionstable) is = "1234" on API_ID,注意它API_ID的值与APINAME.
希望这已经足够清楚了。非常感谢您的帮助!
生锈是轻描淡写。你花了更多的时间来制作图片而不是寻找解决方案。
select apiname, description, endpoint
from apis a, subscriptions s
where a.apiname = s.api_id
and s.user_id = 1234
这应该有效:
SELECT a.apiname, a.description, a.endpoint
FROM apis a
INNER JOIN subscriptions b ON b.api_id = a.apiname
WHERE b.user_id = '1234'