Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

sql server 2008, stored procedure

Posted on 2013-10-23
2
Medium Priority
?
280 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 1500 total points
ID: 39596336
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

877 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