use BBB;
go
drop table sname;
go
create table sname(
salary numeric(10,2),
height float(2)
);
go
insert into sname values(100.2266,100.2266);
go
select * from sname;
输出结果:
numeric会做四舍五入保留二位小数,float会保留全部小数
一般建议使用numeric的人比较多。
use BBB;
go
drop table sname;
go
create table sname(
salary numeric(10,2),
height float(2)
);
go
insert into sname values(100.2266,100.2266);
go
select * from sname;
输出结果:
numeric会做四舍五入保留二位小数,float会保留全部小数
一般建议使用numeric的人比较多。