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 |
|
kwikwisi
Constraint Violating Yak Guru
283 Posts |
Posted - 2009-12-16 : 01:41:48
|
| If i'm not wrong, the max value of int is 2147483647 . But I want to have greater value than int. So I tried to change datatype to BigInt in existing table and it doesnt allow to change the data type.Can anybody tell me how to change the datatype of col in existing table [with data] and max value of bigInt ?thanks in advance. |
|
|
kwikwisi
Constraint Violating Yak Guru
283 Posts |
Posted - 2009-12-16 : 01:50:03
|
| I used below and it throws error.alter table tblTestalter column ID bigint not null goError:Msg 5074, Level 16, State 1, Line 1The object 'PK_tblTest' is dependent on column 'ID'.Msg 4922, Level 16, State 9, Line 1ALTER TABLE ALTER COLUMN ID failed because one or more objects access this column. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-16 : 03:37:17
|
| Is it foreign key to any other table?If so, you need to change them tooMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|