I have a simple stored procedure which does update on a table.
CREATE PROCEDURE `test_v1`(
out v_changed_rows int
)
BEGIN
update mytable
set color = 'green'
where id = 964291;
set v_changed_rows= ROW_COUNT();
END
Calling this stored procedure from mysql workbench gives correct rows affected(i.e. first time it will return 1 and hence forth returns 0 because I'm updating it with the same value and hence no change)
The problem comes when I call this stored procedure from C#
I tried calling this query in a for
loop and each time it returns 1
.
How do I get the rows affected by the query, not the rows found by the query?
Thanks.
1
as the answer. So the problem lies with mysql end? – afrose Feb 10 '18 at 12:45select * from mytable where id = 964291;
against that database. – mjwills Feb 10 '18 at 13:05