关于小数位的设置
我首先创建了一个表,看我带下划线的字段.小数位一位是(18,0)这样设置吗?后来我插入了数据89.5,语句也执行了.可到表里的结果却变成了90,这是为什么呀?各位帮帮忙!谢了create table [dbo].[result]
([r_studentno][char](8)not null,
[r_courseno][char](10)not null,
[r_result][numeric](18,0)not null,
[r_semester][char](1)not null,
[r_year][char](4)not null)
on [primary]
go
alter table[dbo].[result]with nocheck add
constraint [pk_result]primary key clustered
([r_studentno],
[r_courseno])
on [primary]
go
r_studentno r_courseno r_result r_semester r_year
20050101 2005010001 90 1 2005
20050101 2005010002 92 1 2005
20050201 2005010003 78 2 2005
20050202 2005010004 95 2 2005