changing data types [modified]
-
hi fellows, i want to change the data type of a table1(column1) that exists as a foreign key in table2(column2). i want to change the data type of column1(table1) but sql server gives the error that column2(table2) is dependent on column1(table1) so the data type cannot be changed. waht query should i use to ensure that when data type is changed of column1, then the data types of all the referencing columns in different tables should be changed? reply soon plz!!
modified on Saturday, March 8, 2008 3:34 AM
-
hi fellows, i want to change the data type of a table1(column1) that exists as a foreign key in table2(column2). i want to change the data type of column1(table1) but sql server gives the error that column2(table2) is dependent on column1(table1) so the data type cannot be changed. waht query should i use to ensure that when data type is changed of column1, then the data types of all the referencing columns in different tables should be changed? reply soon plz!!
modified on Saturday, March 8, 2008 3:34 AM
-
Suspend referential integrity between the 2 tables, then make your changes.
Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
how do i suspend refrential integrity constraint?
-
how do i suspend refrential integrity constraint?
-
Bring your table up in Design mode. From the 'Table Designer' menu select 'Relationships'. Set the 'Enforce Foreign Key Constraint' option to 'No'.
Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
how do i do it without opening sql server. i want to do it through my own coding
-
how do i do it without opening sql server. i want to do it through my own coding