﻿DROP INDEX IF EXISTS NCU_Terem_IntezmenyId_TanevId_Nev ON dbo.T_TEREM
IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE name = 'NCU_Terem_IntezmenyId_TanevId_Nev_SzervezetId') BEGIN
  CREATE UNIQUE NONCLUSTERED INDEX NCU_Terem_IntezmenyId_TanevId_Nev_SzervezetId
    ON dbo.T_TEREM (C_INTEZMENYID , C_TANEVID , C_NEV, C_SZERVEZETID)
  WHERE TOROLT='F'
  WITH (FILLFACTOR = 80)
END