Click here to Skip to main content
15,908,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.!
Posted
Updated 25-Mar-14 3:53am
v2

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

Thanks
 
Share this answer
 
Comments
mrukr 25-Mar-14 9:44am    
It allows null and also type NULL in there ,I believe its taking integer only....
Have you tried to put NULL into the values in the place of your column in your insert script?

Like this:
SQL
INSERT INTO YOURTABLE (COLUMN1, COLUMN2, COLUMN3) VALUES (NULL, NULL, NULL)


You have to check the column allows null or not first.
 
Share this answer
 
v3
Comments
mrukr 25-Mar-14 9:42am    
It allows null and also type NULL in there ,I believe its taking integer only....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900