|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Today @ 4:49 AM
Points: 10,990,
Visits: 10,572
|
|
As others have said, the question would have been better if the step dropping the constraint had been omitted.
Paul White SQL Server MVP SQLblog.com @SQL_Kiwi
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, June 05, 2013 7:20 AM
Points: 134,
Visits: 30
|
|
Actually it is returned 3 rows and 2 cols.. with started negative value mainvalue
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, January 24, 2013 2:14 AM
Points: 23,
Visits: 59
|
|
Sorry if I am mistaken. I never tried this out but as per the MSDN article http://msdn.microsoft.com/en-us/library/ms177456.aspx it says this
The data rows of the disabled clustered index cannot be accessed except to drop or rebuild the clustered index. This means the following:
These operations will fail: SELECT, UPDATE, DELETE, INSERT, CREATE INDEX, CREATE STATISTICS, UPDATE STATISTICS (on the index), and ALTER TABLE statements that modify table columns or constraints.
So in that case, wont the statement fail when we try to alter the table to drop the constraint??
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 3:50 PM
Points: 5,289,
Visits: 7,219
|
|
Good catch, Ashwin. I think the documentation needs to be expanded to list dropping the constraint as an exception to this rule. Maybe you can submit this as a documentation bug?
Hugo Kornelis, SQL Server MVP Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Friday, April 19, 2013 3:12 PM
Points: 369,
Visits: 165
|
|
|
|
|