标签:xxx rom tab 存储 div mysq table where order
name | age | phone |
chen | 25 | 134xxxx |
zhang | 30 | 158xxxxx |
语法:
CREATE PROCEDURE 过程名([[IN|OUT|INOUT] 参数名 数据类型[,[IN|OUT|INOUT] 参数名 数据类型…]]) [特性 ...] 过程体
CREATE PROCEDURE myproc(OUT s int)
BEGIN
SELECT COUNT(*) INTO s FROM students;
END
带IN参数示例
DROP PROCEDURE IF EXISTS in_param; DELIMITER // CREATE PROCEDURE in_param (IN para_in INT) BEGIN SELECT * from table1 WHERE age = para_in; END ;
//DELIMITER #调用 SET @para_in = 25; CALL in_param (@para_in);
标签:xxx rom tab 存储 div mysq table where order
原文地址:http://www.cnblogs.com/plus-chen/p/6602305.html