+ 1
AM GETTING THIS ERROR PLS CAN SOMEBODY TELL ME WHATS WRONG WITH THIS CODE
Cannot insert the value NULL into column 'Order_TestID', table 'Larson.dbo.Order_Test'; column does not allow nulls. INSERT fails. The statement has been terminated. Insert Into Order_Test (ProductName) Values ('Choco')
3 Answers
+ 4
The table has a column that does not allow NULLS. Check columns of your table and insert a value to all columns that do not have default value or do not allow NULL value.
0
Ensure you assign a value to Order_TestID when inserting , it cannot be blank/null
0
In mysql command prompt, issue following command:
SHOW CREATE TABLE Larson.dbo.Order_Test;
In the output shown, u can see that the column Order_TestID having a NOT NULL constraint. That means its value must be specified in INSERT statement. Mostly i guess it will be a numeric datatype (INT). So, give it an integer value.