mysql> INSERT IGNORE INTO b(c1,c2)VALUES(144,100);SELECT ROW_COUNT();Query OK, 1 row affected (0.00 sec)+-------------+| ROW_COUNT() |+-------------+| 1 |+-------------+1 row in set (0.00 sec)
在sqlyog 工具里,SELECT ROW_COUNT(); 永远都返回-1
应该是个bug
mysql> INSERT IGNORE INTO b(c1,c2)VALUES(144,100);SELECT ROW_COUNT();Query OK, 1 row affected (0.00 sec)+-------------+| ROW_COUNT() |+-------------+| 1 |+-------------+1 row in set (0.00 sec)