Let's say that I have a VARCHAR (which contains numeric data) that I want to use for a simple computation (adding 10 to it). According to the MySQL documentation on CAST functions, I could accomplish this with either a CAST or a CONVERT:
SELECT (CAST(field1 AS SIGNED)) + 10
FROM myTable;
or:
SELECT (CONVERT(field1,SIGNED)) + 10
FROM myTable;
What is the difference between CAST and CONVERT in this sense? Are they both really accomplishing the same thing?