您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

Mysql:Where are stored {procedures | functions | triggers} ? (例程)存储过程、函数、触发器,存在哪儿?

bubuko 2022/1/25 20:02:56 mysql 字数 5680 阅读 591 来源 http://www.bubuko.com/infolist-5-1.html

A.4.7. Where are stored procedures stored? In the proc table of the mysql system database. However, you should not access the tables in the system dat ...

 

A.4.7.

Where are stored procedures stored?

 

In the proc table of the mysql system database. However, you should not access the tables in the system database directly. Instead, query the INFORMATION_SCHEMA ROUTINES and PARAMETERS tables. See Section 24.21, “The INFORMATION_SCHEMA ROUTINES Table”, and Section 24.15, “The INFORMATION_SCHEMA PARAMETERS Table”.

You can also use SHOW CREATE FUNCTION to obtain information about stored functions, and SHOW CREATE PROCEDURE to obtain information about stored procedures. See Section 13.7.5.9, “SHOW CREATE PROCEDURE Statement”.

 

【vs】

 

 

A.5.6.

Is there a way to view all triggers in a given database?

 

Yes. You can obtain a listing of all triggers defined on database dbname using a query on the INFORMATION_SCHEMA.TRIGGERS table such as the one shown here:

SELECT TRIGGER_NAME, EVENT_MANIPULATION, EVENT_OBJECT_TABLE, ACTION_STATEMENT
    FROM INFORMATION_SCHEMA.TRIGGERS
    WHERE TRIGGER_SCHEMA=‘dbname‘;

For more information about this table, see Section 24.29, “The INFORMATION_SCHEMA TRIGGERS Table”.

You can also use the SHOW TRIGGERS statement, which is specific to MySQL. See Section 13.7.5.38, “SHOW TRIGGERS Statement”.

A.5.7.

Where are triggers stored?

 

Triggers are stored in .TRG files, with one such file one per table.

 

Mysql:Where are stored {procedures | functions | triggers} ? (例程)存储过程、函数、触发器,存在哪儿?

原文:https://www.cnblogs.com/jinzhenshui/p/12565900.html


如果您也喜欢它,动动您的小指点个赞吧

除非注明,文章均由 laddyq.com 整理发布,欢迎转载。

转载请注明:
链接:http://laddyq.com
来源:laddyq.com
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


联系我
置顶