delimiter // create procedure get_status1(in p_custno int, out p_status varchar(50)) begin declare lcl_crdtlmt decimal; select creditlimit into lcl_crdtlmt from customers where customernumber = p_custno; if lcl_crdtlmt > 100000 then set p_status="platinum"; elseif lcl_crdtlmt between 25000 and 100000 then set p_status = "gold"; else set p_status = "silver"; end if; end // call get_status1(103,@status); select @status;