DELIMITER $$
DROP PROCEDURE IF EXISTS `dbase`.`paper` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `paper`(in id int)
BEGIN
/*declare a BIGINT ;
set a=3;*/
prepare stmt from"
select ques_id from exam_question t
where ques_subject='01'
order by rand() limit ?";
set @a=id;
execute stmt using @a;
END $$
DELIMITER ;