mysql 语文成绩大于80,数学成绩大于80

mysql> select name from test where name = any(select name from test where chengj
i > 80 and xueke='guangdong') and chengji >80 and xueke ='hunan';

 

 select name from test where chengji > 80 and xueke='guangdong';

 

CREATE TABLE `test` (
  `name` varchar(20) DEFAULT NULL,
  `xueke` varchar(20) DEFAULT NULL,
  `chengji` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

填入信息运行上面语句即可

你可能感兴趣的:(mysql 语文成绩大于80,数学成绩大于80)