How to convert MySQL field types?
问题 I have already come across the convert function. As I understand it, the basic syntax is: select convert(columnName, targetFieldType) as newColumnName from table; Running this command doesn't give me any errors, but when I check the data types they are unchanged. Even when I use commit; the data remains unchanged. In particular, I'm trying to convert data with long type to varchar. Any ideas? 回答1: The given SELECT query will return the value in the new type, but it doesn't change the field