请教问题——从视图向表image字段插入null提示int和image不兼容
--此数据库中TStaffer是视图,Photo字段是image类型,nullinsert into TStaffer(Staffer_ID, Name, Photo) select top 1 Staffer_ID, Name, Photofrom [192.168.1.7].test.dbo.TStaffer
----此数据库中TStaffer是表,Photo字段是image类型,nullinsert into TStaffer(Staffer_ID, Name, Photo) select top 1 Staffer_ID, Name, Photofrom [192.168.1.8].test.dbo.TStaffer
--创建视图语句create view TStaffer asselect......null as Photo,......from table
null as Photo--改为convert(image,null) Photo--此时的Photo字段类型才是image--image类型基本都不用了,用varbinary(max)替换
[解决办法]
null as Photo 你这个列不是image类型