IF NOT EXISTS (SELECT NAME FROM SYSINDEXES  WITH (NOLOCK) 
               WHERE Name = 'IX_GDPRMail_Customer')
  CREATE NONCLUSTERED INDEX IX_GDPRMail_Customer ON GDPRMail (CustomerNumber ASC) 

IF NOT EXISTS (SELECT NAME FROM SYSINDEXES  WITH (NOLOCK) 
               WHERE Name = 'IX_GDPRMail_Reservation')
  CREATE NONCLUSTERED INDEX IX_GDPRMail_Reservation ON GDPRMail (ReferenceNumber ASC, GuestNumber ASC)

IF NOT EXISTS (SELECT NAME FROM SYSINDEXES  WITH (NOLOCK) 
               WHERE Name = 'IX_GDPRMail_GDPRMailAddress')
  CREATE NONCLUSTERED INDEX IX_GDPRMail_GDPRMailAddress ON GDPRMail (GDPRMailAddress ASC)



 --DROP INDEX IX_GDPRMail_Customer ON GDPRMail
 --DROP INDEX IX_GDPRMail_Reservation ON GDPRMail
 --DROP INDEX IX_GDPRMail_GDPRMailAddress ON GDPRMail


