'04D53'能够被转换为4,这里D代表十进制 另外几个例子:‘11E2’ 能够被转换为1100,这里E代表指数 ‘$1234’ 能够被转换为1234,$这里代表钱 ISNUMERIC returns 1 when the input expression evaluates to a valid integer, floating point number, money or decimal type; otherwise it returns 0. A return value of 1 indicates that expression can be converted to at least one of the numeric types.
科学记数法,ISNUMBERIC() 中 D 和 E 是等价的。 select convert(float ,'04D53')
---------------------- 4E+53
Actually, D stands for Decimal, E stands for Exponent(equally power of 10)
Actually, D stands for Decimal, E stands for Exponent(equally power of 10) 在 SQL Server 中没区别: 没转换前,字符串就是字符串。 转换后,指定结果是什么类型就是什么类型(real/float)。
另外几个例子:‘11E2’ 能够被转换为1100,这里E代表指数
‘$1234’ 能够被转换为1234,$这里代表钱
ISNUMERIC returns 1 when the input expression evaluates to a valid integer, floating point number, money or decimal type; otherwise it returns 0. A return value of 1 indicates that expression can be converted to at least one of the numeric types.
select convert(float ,'04D53')
----------------------
4E+53
E stands for Exponent(equally power of 10)
E stands for Exponent(equally power of 10)
在 SQL Server 中没区别:
没转换前,字符串就是字符串。
转换后,指定结果是什么类型就是什么类型(real/float)。
SELECT ISNUMERIC (replace(REPLACE('22d45','D','C'),'E','C'))