将空值插入表中的datetime数据类型
问题描述:
我想在表的第四列中插入空值.我的SQL查询是
I want to insert null value in fourth column into table. my sql query is
select @loccode=LocCode from MstLocation where LocName=@location
insert into InOutRegister values(@loccode,getdate(),convert(varchar, getdate(), 8),'',@remark)
答
NULL
值在哪里? br/> 替换:
And where is aNULL
value?
Replace:
insert into InOutRegister values(@loccode,getdate(),convert(varchar, getdate(), 8),'',@remark)
与:
with:
insert into InOutRegister (Field1, Field2, Field3, Field4, Field5) values(@loccode,getdate(),convert(varchar, getdate(), 8),NULL,@remark)