CREATE TABLE `student` ( `name` varchar(10) DEFAULT NULL, `subject` varchar(10) DEFAULT NULL, `score` int(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 INSERT INTO student VALUES('liming','eng',90); INSERT INTO student VALUES('liming','math',90); INSERT INTO student VALUES('tom','math',93); INSERT INTO student VALUES('tom','eng',91); select * from student where CASE when score = 90 then name in ('liming', 'tom') when score = 91 then name in ('liming', 'tom') END
标签:case,INSERT,DEFAULT,INTO,tom,when,student,MySQL From: https://www.cnblogs.com/boye169/p/17021155.html