Solved

sql server 2008, stored procedure

Posted on 2013-10-23
2
245 Views
Last Modified: 2013-11-27
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
0
Comment
Question by:ronipats
2 Comments
 
LVL 34

Expert Comment

by:Brian Crowe
ID: 39596333
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"
0
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 500 total points
ID: 39596336
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now