# I create procedure but i have problem on executing

**URL:** <https://www.singlestore.com/forum/t/i-create-procedure-but-i-have-problem-on-executing/1840>\
**Category:** Off-Topic\
**Created:** [April 19, 2020, 7:55pm UTC](https://www.singlestore.com/forum/t/i-create-procedure-but-i-have-problem-on-executing/1840 "2020-04-19T19:55:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brahimbatoir](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/b/c67d28/32.png) [@brahimbatoir](https://www.singlestore.com/forum/u/brahimbatoir)\
**Post date:** [April 19, 2020, 7:55pm UTC](https://www.singlestore.com/forum/t/i-create-procedure-but-i-have-problem-on-executing/1840/1 "2020-04-19T19:55:24Z")

</div>

here is the procedure :  
DELIMITER $$  
CREATE PROCEDURE addcategorie (  
nom varchar(50),  
parent integer  
)  
BEGIN  
DECLARE cat integer;  
SELECT MAX(oc\_category.category\_id) + 1 INTO cat FROM oc\_category;  
INSERT INTO oc\_category(category\_id,parent\_id,status ) VALUES(cat,parent,1);  
INSERT INTO oc\_category\_description(category\_id,language\_id,name ) VALUES(cat,1,nom);  
INSERT INTO oc\_category\_to\_store(category\_id,store\_id ) VALUES(cat,0);  
END $$  
DELIMITER ;

execution : EXECUTE addcategorie(“test”,0);

**MySQL said:**

`#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '("test",0)' at line 1`

---

<div class="post-metadata">

**Author:** ![michael.arthur](https://www.singlestore.com/forum/user_avatar/www.singlestore.com/michael.arthur/32/1452_2.png) [@michael.arthur](https://www.singlestore.com/forum/u/michael.arthur)\
**Post date:** [July 22, 2023, 12:35pm UTC](https://www.singlestore.com/forum/t/i-create-procedure-but-i-have-problem-on-executing/1840/2 "2023-07-22T12:35:01Z")

</div>

> [@brahimbatoir](#):
>
> EXECUTE

@brahimbatoir Try CALL rather than EXECUTE:

[https://docs.singlestore.com/cloud/reference/sql-reference/procedural-sql-reference/call/](https://docs.singlestore.com/cloud/reference/sql-reference/procedural-sql-reference/call/)

---

<div class="post-metadata">

**Author:** ![paulwatkins929](https://www.singlestore.com/forum/user_avatar/www.singlestore.com/paulwatkins929/32/1881_2.png) [@paulwatkins929](https://www.singlestore.com/forum/u/paulwatkins929)\
**Post date:** [July 31, 2023, 2:37pm UTC](https://www.singlestore.com/forum/t/i-create-procedure-but-i-have-problem-on-executing/1840/3 "2023-07-31T14:37:17Z")

</div>

thanks for this content that you have give

---

<div class="post-metadata">

**Author:** ![elija6266](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/e/65b543/32.png) [@elija6266](https://www.singlestore.com/forum/u/elija6266)\
**Post date:** [March 15, 2024, 4:36pm UTC](https://www.singlestore.com/forum/t/i-create-procedure-but-i-have-problem-on-executing/1840/4 "2024-03-15T16:36:42Z")

</div>

Hello there, Could you please provide more details about the problem you’re encountering when executing the procedure? Any error messages or specific issues you’re facing would be helpful for troubleshooting. Also as I have gone through this post I found this link  
very informative and useful thanks for sharing your insights mate.
