Can I name a column name
in my mysql tables?
Just a word of caution here. As field name name
is fine.
However in stored procedures name as variable does something else.
Consider the following procedure. When I called this procedure it always would alter the first record in my config database. Once I renamed the variable named name to something else, things worked fine.
PROCEDURE `updateConfig`(IN name VARCHAR(255), IN val VARCHAR(255))
BEGIN
UPDATE LOW_PRIORITY `config`
SET `value`=val
WHERE `name` = name
LIMIT 1;
END