'What is causing the syntax error in my sql stored procedure?

I'm pretty new at stored procedures and I get the following syntax error in my code:

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DELIMITER //CREATE PROCEDURE sp_create_probe(IN matrix_id INT, IN oligo_id IN...' at line 2

Here's the code for my procedure:

DELIMITER //
CREATE PROCEDURE sp_create_probe(IN matrix_id INT, IN oligo_id INT)
BEGIN
  SET FOREIGN_KEY_CHECKS=0;
  INSERT INTO Probes (oligo, microarray) VALUES (oligo_id, matrix_id);
  SET FOREIGN_KEY_CHECKS=1;
END //
DELIMITER ;

Hope someone can help me out

EDIT: Well I ended up fixing it. Classic noob mistake. I had this line before the code you see above:

DROP PROCEDURE IF EXISTS sp_create_probe

Didn't copy that line into the post for some reason but it's missing the ";" at the end. That fixed it.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source