I have statements:
INSERT INTO infotbl(name, phone) VALUES(\'Alex\', \'9999999\');
and update it:
UPDATE infot
The most likely explanation is that there are no rows that satisfy the conditions in the UPDATE and DELETE statements. That is, there are no rows with id
value equal to 1
.
An UPDATE could affect zero rows if the conditions match one or more rows, but the changes applied to the row result in "no change"... that is, the columns being modified already have the values being assigned.
An UPDATE or DELETE that executes successfully, but affects zero rows, is still considered successful.