CREATE PROCEDURE testing(IN ID INT)
SELECT COUNT(*) AS numrows FROM clients.clients_domain;
The “DELIMITER $$” statement causes MySQL to use two dollar signs ($$) as it’s end-of-line delimiter, instead of a semi-colon (;). This will allow any SQL between the BEGIN and END to have a semi-colon at the end of the line, without causing MySQL to think the query is done. The END statement needs the two dollar signs after it so MySQL knows the query is done and ready to be executed.