MemSQL - 如何在 MemSQL 中将 integer/decimal 值转换为 Float?
MemSQL - How to cast integer/decimal values to Float in MemSQL?
我试图将 integer/decimal 值转换为 Float,但 returns 语法 error.I 使用了以下示例查询。
SELECT cast(order_quantity as float) t FROM demo limit 10
返回以下错误。
Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'float) FROM demo limit 10' at line 1
那么有没有办法在 memsql 中转换为浮动?
提前致谢。
MemSQL 不支持转换为浮点数。此处列出了支持的转换:
CAST (input AS {BINARY | CHAR | DATE | DATETIME[(prec)] | DECIMAL[(prec [, scale])] | TIME[(prec)] | SIGNED [INTEGER] | UNSIGNED [INTEGER]})
http://docs.memsql.com/v5.7/docs/convert
十进制转换有用吗?
我试图将 integer/decimal 值转换为 Float,但 returns 语法 error.I 使用了以下示例查询。
SELECT cast(order_quantity as float) t FROM demo limit 10
返回以下错误。
Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'float) FROM demo limit 10' at line 1
那么有没有办法在 memsql 中转换为浮动?
提前致谢。
MemSQL 不支持转换为浮点数。此处列出了支持的转换:
CAST (input AS {BINARY | CHAR | DATE | DATETIME[(prec)] | DECIMAL[(prec [, scale])] | TIME[(prec)] | SIGNED [INTEGER] | UNSIGNED [INTEGER]})
http://docs.memsql.com/v5.7/docs/convert
十进制转换有用吗?