MYSQL有存储过程吗 MYSQL有存储过程吗?可以给一个存储过程运用的市里吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 有,参看下面的网页http://database.51cto.com/art/201006/203159.htm mysql也是数据库,当然有存储过程了、 早先的老版本是没有存储过程的,后来+了!不过之前我写过触发器,貌似mysql对它的支持不是很好! 有存储过程的eg:create proce pro_count(out param int)beginselect count(*) into param from testuserend调用:call pro_count; 看看教程吧,存储过程入门,到GOOGLE 搜索一大堆,慢慢学, 一般的数据库管理系统都有存储过程的,mssql,mysql,... mysql> CREATE TABLE account (acct_num INT, amount DECIMAL(10,2));mysql> CREATE TRIGGER ins_sum BEFORE INSERT ON account -> FOR EACH ROW SET @sum = @sum + NEW.amount;mysql> SET @sum = 0;mysql> INSERT INTO account VALUES(137,14.98),(141,1937.50),(97,-100.00);mysql> SELECT @sum AS 'Total amount inserted'; php动态表导出数据出问题。求高手 php的類中可以不定義成員變量,直接在構造方法中使用并賦值嗎? php用中文来正则匹配file_get_contents抓来的网页问题 php把表格里面的数据导入到Excel中 数据库读不到第一条记录 关于SecFilterScanPOST On是怎么使用的 php的fopen()函数在solaris下面无法读取远程文件 MYSQL16进制转10进制问题 php插入韩文txt文件内的数据,SQL-Front显示乱码 有没有自动定义格式的PHP开发工具? 求助:关于遍历文件夹 数组转换,急...
http://database.51cto.com/art/201006/203159.htm
不过之前我写过触发器,貌似mysql对它的支持不是很好!
eg:create proce pro_count(out param int)
begin
select count(*) into param from testuser
end
调用:call pro_count;
mysql> CREATE TRIGGER ins_sum BEFORE INSERT ON account
-> FOR EACH ROW SET @sum = @sum + NEW.amount;
mysql> SET @sum = 0;
mysql> INSERT INTO account VALUES(137,14.98),(141,1937.50),(97,-100.00);
mysql> SELECT @sum AS 'Total amount inserted';