Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当您在 MySQL 中发出 SELECT 语句时,是否可以将数字和日期转换为字符串?像这样的东西:
SELECT str(a.Amount) as AMT, str(a.date) as Date FROM LALAZUK as a...
你需要的是CAST:
CAST
SELECT CAST(a.Amount AS CHAR CHARACTER SET utf8) as AMT, SELECT CAST(a.date AS CHAR CHARACTER SET utf8) as Date FROM LALAZUK as a...
http://dev.mysql.com/doc/refman/5.0/en/charset-convert.html