Re: more then one data in one field possible?
Quote
now I got the foreignkey mealID correctly into table 'mealincredients' but I would have to write more then one value into the column incredientsID in table 'mealincredients'.
No, you don't.
You add a new
row into mealingredient for each ingredient in each recipe:
select * from meal ;
+--------+
| mealId | ...
+--------+
| 1 |
| 2 |
+--------+
select * from ingredient ;
+--------------+
| ingredientId | ...
+--------------+
| 22 |
| 33 |
| 44 |
| 55 |
+--------------+
select * from mealIngredient ;
+--------+--------------+
| mealId | ingredientId | ...
+--------+--------------+
| 1 | 22 |
| 1 | 33 |
| 2 | 55 |
+--------+--------------+
Regards, Phill W.
Subject
Written By
Posted
February 11, 2014 01:49AM
February 11, 2014 10:43AM
Re: more then one data in one field possible?
February 12, 2014 06:19AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.