In this exercise, we want to create a SQL DDL script to add the same index to the
Products table as defined in the preceding exercise using the SSMS table designer.
0001_create_Products_table.sqlfile we created during the preceding exercises.
IX_Products_Nameindex if it already exists. The code is as shown in the following code snippet:
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID('Product') AND name = 'IX_Products_Name') DROP INDEX IX_Products_Name ON Product GO
Productstable. Your code should look similar to the following code snippet:
CREATE UNIQUE ...