longdat
asked on
Drop table columns that are constrained
I have a SQL Server 2005 database .However database tables have one column(rowguid) that is constrained by some objects that I don't know so far.Therefore I can't drop this column.This column is allowed to be null.
Please give me a solution to drop this column.
Please give me a solution to drop this column.
I dont really understand why you are trying to delete this column. In case, some foreign key constraint is defined on this column then u need to find the columns which is related to this columns , if you need to delete those columns also, drop them all first , then drop the constraint and that particular column
ASKER
Actually, problem is that when I do replication, database is automatically added one column (rowguid) on every table with a lot of constraints.Now I want to drop this column in order to export file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
To know which is the constraint you can generate the create script of the tabler using SQL Server Management studio, and then drop the costraint (again you ca do it from SQL Server Management studio, navigating the tree view under the table -> constraint)