Link to home
Start Free TrialLog in
Avatar of wasabi3689
wasabi3689Flag for United States of America

asked on

why this different?

I have two MS  SQL database. They are the same database. but made in different time ( 6 ms ago) and different version of MS SQL server. One is made MS SQL 2008, another one is maded in MS  SQL 2008 R2

When I compare them, I see the following is strange.

One database showing the following for table ABC

[name] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,

Another database showing the same table and same field as

[NAME] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

Why NOT NULL becomes NULL???
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Why NOT NULL becomes NULL???
Perhaps someone changed it?  But the bigger question is why not?  What exactly is your question?
hi

one table was created with the column constraint NOT NULL
and the other made with no constraint that's all.

you can change the constraint on any of the tables as long as the data is correct
for example change the NULL to not null as long as you don't really have any nulls in the columns.

or on the other hand change the NOT NULL column to NULL.

Aaron.
SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wasabi3689

ASKER

I want to know if the default setting to NULL or NOT NULL is different for different MS  SQL server version?

Where to see the default setting for column NULL or NOT NULL setting in MS  SQL?

Why the same database for this field got change from NOT NULL to NULL as I've known we don't that change at all

This is important because our application is depended on it. I want to find out the root cause.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial