Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to drop a field with index in SQL?
Message
From
08/07/2011 11:43:32
 
 
To
08/07/2011 09:46:18
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Desktop
Miscellaneous
Thread ID:
01517683
Message ID:
01517708
Views:
32
>>Wait, I don't get an error with another index, I think I looked in a wrong place.
>>
>>>What kind of index is it? What error do you get?
>>>
>>>>I figured that out, but I can't drop the index with the two commands I mentioned below. How can I drop the index?
>>>>
>>>>
>>>>>You have to drop index first.
>>>>>
>>>>>>
>>>>>>I can't figure out how to drop a field that has an index in SQL Server?
>>>>>>when I try DROP INDEX myIndex ON MyTable it gives me an error, but also when I type ALTER TABLE MyTable DROP INDEX MyIndex.
>>>>>>What is the correct syntax?
>
>
>If the index is PK index you need to drop constraint not index.

Until now I haven't used PK except when I have an autoincrement field. What is the advantage of a PK other than assurance of uniqueness? Are there performance gains?
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform