1322
MySQLerrorstored-procedureshigh confidence

Duplicate parameter name

Production Risk

Low — compile-time error; routine not created.

What this means

Two parameters in a stored procedure or function declaration share the same name.

Why it happens
  1. 1Copy-paste error in parameter list
  2. 2Renaming one parameter and forgetting to rename the other
How to reproduce
trigger — this will error
trigger — this will error
CREATE PROCEDURE p(x INT, x VARCHAR(10)) BEGIN END;

expected output

ERROR 1322 (42000): Duplicate parameter: x

Fix

Use unique parameter names

Why this works

Each parameter in the signature must have a distinct name.

Sources
Official documentation ↗

MySQL 8.0 — 1322 ER_SP_DUP_PARAM

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MySQL errors