I have to create a table Product with elements P, PType, PName, Price and Origin.
I need to have the constraint that all products with PType "Meat" must have "Europe" as Origin. I wanted to add the constraint in an alter table but I saw that using an alter table means modifying the original table after its creation, but I need to have this condition at the creation of the table. I don't know how to write this constraint, can someone give me a hint?
PType = "Meat"
butOrigin != "Europe"
then fail the query; option 2 - ifPType = "Meat"
then setOrigin = "Europe"
despite of assigned value (no fail).