Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ALTER TABLE mytable ADD mynewid int NOT NULL DEFAULT(0) WITH
Message
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
ALTER TABLE mytable ADD mynewid int NOT NULL DEFAULT(0) WITH
Miscellaneous
Thread ID:
01006780
Message ID:
01006780
Views:
65
Hello everyone.

Did anyone faced this problem? What could be causing it?
When I run this query in a query analyzer for the table with many records:
ALTER TABLE mytable ADD mynewid int NOT NULL DEFAULT(0) WITH VALUES

new field mynewid is created, but records are populated with random number instead of 0.

That table does not have any Trigger on it.
Field name could have any name.
DBCC CHECKTABLE and DBCC CHECKDB did not show any errors.

Thanks, Paul.
Next
Reply
Map
View

Click here to load this message in the networking platform