mysql 参考手册 : http://dev.mysql.com/doc/refman/5.1/zh/database-administration.html mysql 存储过程 : http://database.51cto.com/art/201006/203159.htm