MySQL : When stored procedure parameter name is the same as table column name

Simplest way to distinguished between your parameter and column (if both name is same) is to add table name in your column name.

UPDATE customers SET customers.Name = Name;

Even you can also add database prefix like

UPDATE yourdb.customers SET yourdb.customers.Name = Name;

By adding database name you can perform action on more than 1 database from single store procedure.

Leave a Comment