DECLARE imonth int DEFAULT 1; select @imonth; 显示imonth并不是1; 必须: set @imonth=1 select @imonth=1; 显示imonth才是1;