码迷,mamicode.com
首页 > 数据库 > 详细

Mysql存储过程

时间:2016-11-13 09:28:07      阅读:258      评论:0      收藏:0      [点我收藏+]

标签:stat   create   nes   comm   过程   proc   rac   uri   oca   

1.创建存储过程

mysql> delimiter $
mysql> create procedure pro_user()
    -> begin
    ->     select * from tb_user;
    -> end $

2.查看当前数据库的存储过程

mysql> use book;
mysql> show procedure status;
+------+-------------+-----------+----------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
| Db   | Name        | Type      | Definer        | Modified            | Created             | Security_type | Comment | character_set_client | collation_connection | Database Collation |
+------+-------------+-----------+----------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
| book | findAllBook | PROCEDURE | root@localhost | 2016-09-04 11:13:31 | 2016-09-04 11:13:31 | DEFINER       |         | gbk                  | gbk_chinese_ci       | utf8_general_ci    |
| book | pro_test    | PROCEDURE | root@localhost | 2016-11-13 08:27:17 | 2016-11-13 08:27:17 | DEFINER       |         | gbk                  | gbk_chinese_ci       | utf8_general_ci    |
| book | pro_user    | PROCEDURE | root@localhost | 2016-11-13 08:44:34 | 2016-11-13 08:44:34 | DEFINER       |         | gbk                  | gbk_chinese_ci       | utf8_general_ci    |
+------+-------------+-----------+----------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
3 rows in set (0.01 sec)

Mysql存储过程

标签:stat   create   nes   comm   过程   proc   rac   uri   oca   

原文地址:http://www.cnblogs.com/shootercheng/p/6058101.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!