将NULL添加到整数列而不是0 VB.net [英] Add NULL to an Integer Column instead of 0 VB.net

查看:64
本文介绍了将NULL添加到整数列而不是0 VB.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

插入INTO表格列(id,product,productid)值(id,product,)





空value字段为空,但它将0作为整数字段,如何使其添加NULL或将其留空。

它允许null并在那里键入NULL,我相信它只取整数。 ...



任何帮助表示感谢。!

解决方案

将该列标记为null-able从插入列表中删除列或将Null放在关联的变量中



谢谢


您是否尝试将NULL放入插入脚本中列的位置值?



像这样:

  INSERT   INTO  YOURTABLE(COLUMN1,COLUMN2,COLUMN3) VALUES  NULL  NULL  NULL 





您必须先检查列是否允许为空。


Insert INTO Table Columns(id,product,productid,) values(id,product,"")


The empty value field is empty but it puts 0 as its integer field how do I make it add NULL or leave it blank instead.
It allows null and also type NULL in there ,I believe its taking integer only....

Any help appreciated thanks.!

解决方案

Mark that column as null-able and either remove the column from insert list or put Null in the associated variable

Thanks


Have you tried to put NULL into the values in the place of your column in your insert script?

Like this:

INSERT INTO YOURTABLE (COLUMN1, COLUMN2, COLUMN3) VALUES (NULL, NULL, NULL)



You have to check the column allows null or not first.


这篇关于将NULL添加到整数列而不是0 VB.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆