Error In SQL SERVER DataBase
am trying to insert four varchar(50) values in a table which is with a primarykey column id_number. i didnt check : "True" to the null field . so it should not allow null values in table. but while am trying . it allows null values. including primary key column. how is possible ? pls help me. i am using this database with visual studio 2008

Software/Hardware used:
ASKED: July 24, 2008  9:41 AM
UPDATED: July 28, 2008  8:00 AM

Answer Wiki:
If you Primary Key column allows null, then it's not setup as a primary key as primary key columns can not allow null values in them. If you check the box in the UI it tells to column to allow nulls.
Last Wiki Answer Submitted:  July 24, 2008  7:15 pm  by  Denny Cherry   64,520 pts.
All Answer Wiki Contributors:  Denny Cherry   64,520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Check out my SQL Server blog “SQL Server with Mr Denny” for more SQL Server information.

 64,520 pts.

 

if you check the properties of column_id, it would not have been set as a primary key, else it would not allow null values.

 8,200 pts.