I\'m trying to do some simple manipulations with variables in MySQL 5.0 but I can\'t quite get it to work. I\'ve seen many (very!) different syntaxen for DECLARE/SET, I\'m not
Looks like you forgot the @ in variable declaration. Also I remember having problems with SET in MySql a long time ago.
SET
Try
DECLARE @FOO varchar(7); DECLARE @oldFOO varchar(7); SELECT @FOO = '138'; SELECT @oldFOO = CONCAT('0', @FOO); update mypermits set person = @FOO where person = @oldFOO;