如何在Navicat中看到我为MySQL创建的存储过程

时间:2022-01-24 08:50:53

I create stored procedure in Navicat for MySQL as follow:

我为MySQL创建Navicat中的存储过程如下:

CREATE PROCEDURE myloop()

        BEGIN

                    DECLARE customerID INT DEFAULT 11;

                    first_loop: LOOP

                        SET customerID = customerID +1;

                        DECLARE itemID INT DEFAULT 0;                   

                    second_loop: LOOP

                        SET itemID = itemID +1;

                        Insert INTO tbl_order(customerId, itemId) VALUES
                        (customerID, itemID );  

                      IF itemID=3000 THEN
                         LEAVE second_loop;
                      END IF;
                    END LOOP second_loop;

                    IF customerID=3000 THEN
             LEAVE first_loop;
          END IF;
        END LOOP first_loop;

END

but i can't find anywhere to call my Stored Procedure.

但是我找不到任何地方可以调用我的存储过程。

how can i see and call my Created Stored Procedure?

如何查看和调用创建的存储过程?

2 个解决方案

#1


2  

It's right under the tables selection.

它就在表格选择下面。

如何在Navicat中看到我为MySQL创建的存储过程

Alternatively you can just open a query window and write call yourProcedure()

或者,您可以打开一个查询窗口并编写call yourProcedure()

#2


1  

in Navicat 9.0.8 version there is no tab for your created Stored Procedure.

在Navicat 9.0.8版本中,没有为创建的存储过程设置标签。

i prefer to use "SQLQueryBrowser" to overcome your problem.

我更喜欢使用“SQLQueryBrowser”来解决您的问题。

#1


2  

It's right under the tables selection.

它就在表格选择下面。

如何在Navicat中看到我为MySQL创建的存储过程

Alternatively you can just open a query window and write call yourProcedure()

或者,您可以打开一个查询窗口并编写call yourProcedure()

#2


1  

in Navicat 9.0.8 version there is no tab for your created Stored Procedure.

在Navicat 9.0.8版本中,没有为创建的存储过程设置标签。

i prefer to use "SQLQueryBrowser" to overcome your problem.

我更喜欢使用“SQLQueryBrowser”来解决您的问题。