Skip to content

Commit adaa356

Browse files
authored
Merge pull request MicrosoftDocs#6661 from rjk/patch-1
Update create-unique-indexes.md
2 parents 19e7699 + d02341d commit adaa356

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/relational-databases/indexes/create-unique-indexes.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,11 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||
159159
```
160160
USE AdventureWorks2012;
161161
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.
163164
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'))
165167
DROP INDEX AK_UnitMeasure_Name ON Production.UnitMeasure;
166168
GO
167169
-- Create a unique index called AK_UnitMeasure_Name

0 commit comments

Comments
 (0)