The error occurs when a stored routine declares two or more parameters with the same name.
MySQL Error 1330: ER_SP_DUP_PARAM appears when a stored procedure or function repeats a parameter name. Rename or remove the duplicate parameter to resolve the issue.
Duplicate parameter: %s
MySQL raises Error 1330 with the message “Duplicate parameter: X” while compiling a stored procedure or function that lists the same parameter name more than once in its parameter list.
Because parameter names must be unique within a routine, the parser halts on the duplicate and stops the CREATE or ALTER statement.
The error triggers at compile time, not runtime, during CREATE PROCEDURE, CREATE FUNCTION, ALTER PROCEDURE, or ALTER FUNCTION statements.
It affects all MySQL versions that support stored routines (5.0+), including MariaDB forks, and is independent of SQL mode.
Leaving the duplication unfixed prevents the routine from being created or altered, blocking deployment pipelines, CI/CD jobs, or manual releases.
Quick resolution keeps schema migrations deterministic and avoids broken application builds.
Copy-pasting parameter lists often leads to two identical parameter names.
Renaming one parameter but forgetting to update another occurrence causes collision.
MySQL treats parameter names as case-insensitive, so user_id and USER_ID are duplicates.
Generic parse error that also appears during malformed routine definitions.
Raised when a routine name is illegal or duplicates another routine.
Triggers if a sub-select is used in a place not allowed inside stored routines.
No. Only duplicate names matter. Order is irrelevant.
MySQL compares parameter names case-insensitively, so param and PARAM clash.
No. The duplicate parameter rule is enforced regardless of sql_mode settings.
Galaxy’s real-time parser flags naming collisions, and its AI copilot auto-renames duplicates.