mysql执行增删改查语句返回受影响行数
insert into `MyTestTable`(`ID`,`Name`) select '1','role1' union all select '2','role2' union all select '3','role3'; select row_count(); --// 输出3(返回新添加的记录数),[注:如果使用insert into...values只返回1] select * from `MyTestTable`; select found_rows(); --// 输出3(返回选择的行数) update `MyTestTable` set `Name`='people'; select row_count(); --// 输出3(返回修改的行数) delete from `MyTestTable`; select row_count(); --// 输出3(返回删除的行数)
标签:返回,--,改查,MyTestTable,mysql,增删,select From: https://www.cnblogs.com/ZhuMeng-Chao/p/17029407.html