标签:
When you want to convert from float or real to character data, using the STR string function is usually more useful than CAST( ). This is because STR enables more control over formatting.
Syntax
STR ( float_expression [ , length [ , decimal ] ] )
Arguments
SELECT STR(123.45, 6, 1);
结果是 123.5,类型是Varchar
标签:
原文地址:http://www.cnblogs.com/ljhdo/p/4910852.html