November 5, 2004 at 5:55 am
Greetings All,
I have a table ("TableA")with several columns. Two of these are now redundant (as I have build a new table ("TableB") which now includes these redundant columns). When I try to delete the redundant columns from TableA, SQL EM refuses on the basis that there are dependancies (good safety feature - usually). However, I don't care about these dependances and want shot of these redundant columns! Accordingly, does anyone know how to delete my redundant columns while ignoring this SQL protection block?
Thanking you in advance,
Diarmuid
November 5, 2004 at 9:01 am
What type of dependencies? If there are foreign keys referencing the column, or if it is indexed, you will have to drop the keys/index in order to drop the column.
--
Adam Machanic
whoisactive
November 5, 2004 at 2:21 pm
In addition to Adam, you write, you've tried via EM. Have you yet tried it via Query Analyzer with an ALTER TABLE...DROP COLUMN statement?
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply