Good Morning,
Say I have an insert statement:
Insert INTO tblTest (f开发者_运维百科ieldOne,FieldTwo,fieldThree) VALUES ('valueOne','valueTwo','null')
This statement doesn't seem to want to insert a null value into the database... I have also tried to insert the word "nothing".
Has anyone any ideas how to make this work? I am using SQL server 2005.
First of all, instead of 'null', try null (lose the quotes)
Then check that the fieldThree column on TblTest doesn't have any constraint prohibiting the use of null values...
Try
Insert INTO tblTest (fieldOne,FieldTwo,fieldThree) VALUES ('valueOne','valueTwo',NULL)
Check for fieldThree not to be NOT NULL.
If you're trying to INSERT 'NULL' string, then just check if fieldThree is varchar type.
Insert INTO tblTest (fieldOne,FieldTwo) VALUES ('valueOne','valueTwo').
精彩评论