File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
docs/relational-databases/indexes Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -159,9 +159,11 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||
159
159
```
160
160
USE AdventureWorks2012;
161
161
GO
162
- -- Find an existing index named AK_UnitMeasure_Name and delete it if found
162
+ -- Find an existing index named AK_UnitMeasure_Name
163
+ -- on the Production.UnitMeasure table and delete it if found.
163
164
IF EXISTS (SELECT name from sys.indexes
164
- WHERE name = N'AK_UnitMeasure_Name')
165
+ WHERE name = N'AK_UnitMeasure_Name'
166
+ AND object_id = OBJECT_ID(N'Production.UnitMeasure', N'U'))
165
167
DROP INDEX AK_UnitMeasure_Name ON Production.UnitMeasure;
166
168
GO
167
169
-- Create a unique index called AK_UnitMeasure_Name
You can’t perform that action at this time.
0 commit comments