?
Solved

Renaming a Constraint

Posted on 2004-08-17
3
Medium Priority
?
2,406 Views
Last Modified: 2012-08-13
Is is possible to rename a constraint once it's created (In Query Analyzer)....besides Dropping it and Recreating it.
0
Comment
Question by:phunchak
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
patrikt earned 150 total points
ID: 11824614
NO.

Constraints, Indexes atc. can be only droped and recreated.

If you want to seve time during recreation use WITH NOCHECK. It'll skip existing records checking.

Patrik
0
 
LVL 2

Author Comment

by:phunchak
ID: 11824687
That's what I thought...
Although in Enterprise manager you can rename a PK or FK constraint or an index through the manage relationships button.   Although the one I want to change is a Default constraint which doesn't show up on the list.
0
 
LVL 12

Expert Comment

by:patrikt
ID: 11824740
Be avare that if you rename something in EM it can result in drop/create and sometimes to create/copy/drop operation. This can have big impact on your server performance if done in "bad" moment.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
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.
Suggested Courses

807 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