差不多呢。SET @COUNT_STRING = CONCAT('SELECT * FROM ', 't_admin', ' where 1=1 ', ' and id=7'); PREPARE count_stmt FROM @COUNT_STRING; EXECUTE count_stmt;