I'm trying to update a table called rep
in a database called premier_products
. The table's primary key is rep_num
.
When I run the following statement:
update rep
set last_name = "Perry"
where rep_num = 85;
I get an error that says "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column."
I Googled that error message and most of the responses were along the lines of "You have to use a where
clause or turn off safe mode". But as you can see, I am using a where
clause. Why is the error appearing if I have a where
clause?
MySQL server version 5.6.20.
This image shows that rep_num is definitely my primary key:
This image shows the current rep table: