Link to home
Start Free TrialLog in
Avatar of ronipats
ronipats

asked on

sql server 2008, stored procedure

sir i have created one table (degree master) as below in sql server 2008

degreeid  int(identity) PK
degree name varchar(50)

i have few records of data in this table and this table has relationship with two more table (program master and faculty master).

now i want to add a new field to this degree master table after degreeid field.

i.e.
degreeid int(identity)PK
degreetype varchar(50)
degreename varchar(50).

after adding this field when i try to save this table it gives me error and suggest to drop and re-create table again. I also tried it after removing relationship with other two table but still it gives me the same error and suggest me to drop and create table again  which i dont want to do.

Is there any other ways to do so.

thanks
ronak
Avatar of Brian Crowe
Brian Crowe
Flag of United States of America image

If you are inserting a column, as opposed to just adding it to the end, then you have no choice but to drop and recreate the table.  This is typically handled automatically after a warning prompt from SSMS.  However, there is a default setting that will prevent this action from occurring.  To enable the change...

Go into Tools -> Options -> Designers-> Uncheck "Prevent saving changes that require table re-creation"
ASKER CERTIFIED SOLUTION
Avatar of Pratima
Pratima
Flag of India 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