I've created a junction table like this one:
http://imageshack.us/scaled/landing/822/kantotype.png
I was trying to figure out a query that could able to select some rows - based on the PokémonID
- and then updating only the first or second row after the major "filtering".
For example:
Let's suppose that I would like to change the value of the TypeID from the second row containing PokémonID = 2
. I cannot simply use UPDATE KantoType SET TypeID = x WHERE PokémonID = 2
, because it will change both rows!
I've already tried to use subqueries containing IN
,EXISTS
and LIMIT
, but with no success.