作者:刘晨晖
1. 数据库名:test ;
表名:chengjibiao;
字段:Id int , Name char , English int , Maths int , Physis int ;
2. 存储过程:
DELIMITER $$
DROP PROCEDURE IF EXISTS `test`.`query` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `query`( in N int, out s char(254) )
BEGIN
declare a,b,c,d,e int;
declare f char(100);
declare g decimal(4,2);
set e=1;
drop table if exists zongping;
create table zongping(NUM int,Name char(255),English int,Maths int,Physis int,Total int,aver decimal(4,2));
repeat
select English,Maths,Physis,Name into a,b,c,f from chengjibiao where Id=e;