时间:2021-07-01 10:21:17 帮助过:2人阅读
MySQL 5.5
MySQL 5.6
附上所有脚本:
drop table IF EXISTS zzz_repair;
drop table IF EXISTS zzz_repair_goods;
drop table IF EXISTS zzz_sell;
CREATE TABLE IF NOT EXISTS `zzz_repair` (
`sn` int(11) NOT NULL,
`province` int(11) NOT NULL
) ;
INSERT INTO `zzz_repair` (`sn`, `province`) VALUES
(1, 2),
(3, 3),
(5, 5),
(8, 8);
CREATE TABLE IF NOT EXISTS `zzz_repair_goods` (
`sn` int(11) NOT NULL,
`name` int(11) NOT NULL,
`num` int(11) NOT NULL
) ;
INSERT INTO `zzz_repair_goods` (`sn`, `name`, `num`) VALUES
(1, 2, 10),
(3, 4, 10),
(5, 6, 10);
CREATE TABLE IF NOT EXISTS `zzz_sell` (
`sn` int(11) NOT NULL,
`province` int(11) NOT NULL,
`num` int(11) NOT NULL
) ;
INSERT INTO `zzz_sell` (`sn`, `province`, `num`) VALUES
(1, 2, 20),
(3, 4, 20),
(5, 6, 20),
(9, 9, 20);
Mysql 的bug?子查询包含group by结果各异
标签: