Without shutting off safe update, how to write a Where clause that checks for a certain entry of a KEY column?"
'Cause basically every answer I've seen is "Shut off Safe Update", either temporarily, or permanently.
Although, Nic3500 did point me to an answer by Rudy De Volde where you search for where the key column doesn't exist.
But I'm trying to select a row by it's key column, and that isn't working.
Is Safe Update too broken to use? Or is it just the simplest solution that no one is giving ways to actually fix the error?
Although, I did copy try to update a table I created in my own database, and with:
create table z.country AS (SELECT * FROM world.country);
insert into z.country (Code, name, continent, population) values ("NHZ", "Nariza", "Antarctica", 6523);
This works:
Update WORLD.country set Name = "Noziland" where name = "Aruba" and Code <> "ABC" and Code <> "NHA";
These don't:
Update z.country set Name = "Noziland" where name = "Aruba" and Code <> "ABC" and Code <> "NHA";
Update z.country set Name = "Noziland" where Continent = "Antarctica" and Code <> "NHC" and Code <> "NHA";
EDIT: Oh, the Select * method of copying doesn't preserve primary keys! I have to add that manually!