之前经常在程序中拼接sql语句,其实我们也可以在存储过程中拼接sql 语句,动态的执行~~ 代码如下: DROP PROCEDURE IF EXISTS SearchByDoctor;CREATE PROCEDURE SearchByDoctor( IN DoctorId VARCHAR(50), IN deptId VARCHAR(50), IN beginDate VARCHAR(20), IN endDate VARCHAR(20), IN StandDeptId VARCHAR(50),…