知道你想要求的id就直接写:select id from table where condition='a' and id=2;如果不知道话,只能分两次查了。