0

当您在 MySQL 中发出 SELECT 语句时,是否可以将数字和日期转换为字符串?像这样的东西:

SELECT str(a.Amount) as AMT, str(a.date) as Date FROM LALAZUK as a...
4

1 回答 1

3

你需要的是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

于 2012-05-22T20:26:50.543 回答