mysql计算两个字段的百分比
CREATE TABLE `testnum` ( `a` varchar(255) DEFAULT NULL, `b` varchar(255) DEFAULT NULL, `c` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
select CONCAT(ROUND(a/b*100,2),"%") from testnum;
CREATE TABLE `testnum` ( `a` varchar(255) DEFAULT NULL, `b` varchar(255) DEFAULT NULL, `c` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
select CONCAT(ROUND(a/b*100,2),"%") from testnum;