日期:2014-05-18  浏览次数:20439 次

bit类型的插入
insert  
into   student   (studentcard,sname,sgrade,sspecialtyID,isValid)
values   ( '1 ', 'test_sname ', '2005 ', '2 ',convert(bit,0))

isValid   是bit类型
错误提示:
消息   8152,级别   16,状态   4,第   1   行
将截断字符串或二进制数据。
语句已终止。


------解决方案--------------------
:)
------解决方案--------------------
可以直接

insert
into student (studentcard,sname,sgrade,sspecialtyID,isValid)
values ( '1 ', 'test_sname ', '2005 ', '2 ',0)
------解决方案--------------------
呵呵,直接写0或1就成了啊