借助SHOW CREATE PROCEDURE語句,我們可以看到預存程序的原始碼。為了使其理解,我們在查詢中使用名為 allrecords() 的預存程序,如下所示 -
mysql> Show Create Procedure allrecords\G *************************** 1. row *************************** Procedure: allrecords sql_mode:ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION Create Procedure: CREATE DEFINERb=`root`@`localhost` PROCEDURE `allrecords`() BEGIN Select * from Student_info; END character_set_client: cp850 collation_connection: cp850_general_ci Database Collation: latin1_swedish_ci 1 row in set (0.00 sec)
以上是我們如何查看特定MySQL預存程序的源代碼?的詳細內容。更多資訊請關注PHP中文網其他相關文章!