ms sql server 的books online中远问:
money
Monetary data values from -2^63 (-922,337,203,685,477.5808) through 2^63 - 1 (+922,337,203,685,477.5807), with accuracy to a ten-thousandth of a monetary unit. Storage size is 8 bytes.
smallmoney
Monetary data values from - 214,748.3648 through +214,748.3647, with accuracy to a ten-thousandth of a monetary unit. Storage size is 4 bytes.
就是存储长度不同,所以数据的范围和精度不同。
money
Monetary data values from -2^63 (-922,337,203,685,477.5808) through 2^63 - 1 (+922,337,203,685,477.5807), with accuracy to a ten-thousandth of a monetary unit. Storage size is 8 bytes.
smallmoney
Monetary data values from - 214,748.3648 through +214,748.3647, with accuracy to a ten-thousandth of a monetary unit. Storage size is 4 bytes.
就是存储长度不同,所以数据的范围和精度不同。
smallmoney:货币数值,范围:-2^31/10000到(2^31-1)/10000 以万元为单位.占4字节.所以说,它们的区别在于,所能表示的范围大小不一样.占用的空间也不一样.