Tagged Questions
2
votes
2answers
937 views
SQL Server : how to drop all constraints on a table in T-SQL
I´d like to drop all constraints on all tables in my database, because I need to change the relationships of many of the tables.
Is there any way to do that with T-SQL? I cannot find any solution ...
3
votes
1answer
445 views
Why does altering a table and adding a foreign key create an extra constaint?
Edit: It was a default constraint as a result of setting a default value when adding the column. The name gave it away when starting with 'DF__'. Anyway, solved it by adding the column and manually ...
1
vote
1answer
295 views
Can't run Alter Table command due to locks
I'm unable to drop, delete or alter a database in my Local SQL Server instance.
I have run sp_Who2 and there don't appear to be any processes using the database apart from a process which gets ...
15
votes
3answers
2k views
Adding columns to production tables
What's the best way to add columns to large production tables on SQL Server 2008 R2? According to Microsoft's books online:
The changes specified in ALTER TABLE are implemented immediately. If the ...
