Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ingrDesc が「クミン」の場合、idR とレシピタイトルを選択するにはどうすればよいですか。これは私が持っているものです。
RecipIngr = (idR*, idI*)
SELECT idR, recipeTitle FROM Recipe JOIN Ingredient WHERE ingrDesc='cumin'
テーブル構造を知らなければ、推測は多少ランダムになります。以下、勝手な推測です。Ingredient には Recipe に関連する外部キーがあると思います。そのキーを RecipeId と呼びます。
SELECT idR, recipeTitle FROM Recipe r INNER JOIN Ingredient i ON r.idR = i.RecipeId WHERE ingrDesc='cumin'