How to fix "0 rows affected issue" in SQL UPDATE

I was trying to update some rows of a table using sql update statement, but it always returned "0 rows affected " message. I was using following syntax for that.

UPDATE table_name
SET column1=value1,column2=value2,...
WHERE column1='AB1 2CD';


The issue was the space inserted within the value I compare in where statement. So I used a column value, which has no spaces within its value for where statement. Then it worked.


You can get more information about this issue from following link.


http://stackoverflow.com/questions/14511018/where-clause-doesnt-work-in-sql-because-of-space-character

0 Response to "How to fix "0 rows affected issue" in SQL UPDATE"

Post a Comment