mysql cast to varchar
snippet in sql

mysql parse int

user6980

SELECT CAST(PROD_CODE AS INT) FROM PRODUCT

mysql cast to varchar

user5433

SELECT CAST(aField as UNSIGNED) from table; 
-- for VARCHAR use CHAR(50), INT use UNSIGNED