Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rubs_65
Posting Yak Master
144 Posts |
Posted - 2009-03-16 : 15:36:27
|
Hi,We have a table where default constraint value for a column was created as (7000000000000000000) but when I look as sp_help table_name it is shown as ((7000000000000000000.)) and on another database on same machine for same table and column value is shown from sp_help as (7000000000000000000). So I was trying in local environment and ran following commands:create table dd (dd numeric (21) NOT NULL DEFAULT 7000000000000000000)ALTER TABLE dd ADD dd1 NUMERIC(21) DEFAULT 7000000000000000000 insert into dd default values select * from dd where dd = 7000000000000000000.select * from dd where dd = 7000000000000000000It looks like dd and dd1 columns are both shown as ((7000000000000000000.)) so I have 2 questions:1) Is there a way to change the default value to (7000000000000000000), I tried dropping and adding constraint but still same old value2) What can be the possible reason that value is shown differently in 2 different databases (I am not sure how table was created but I tried in above scenario both specifying value when creating table and altering table with same result)Thanks--Rubs |
|
|
|
|