Multiple NULL values in a Unique index in SQL Server/DB2 LUW « DB Systems & Applications Weblog
ALTER TABLE TEST_UQ ADD COL3 AS (CASE WHEN COL2 IS NULL THEN CAST(COL1 AS NVARCHAR(10)) ELSE COL2 END);
Multiple NULL values in a Unique index in SQL Server/DB2 LUW « DB Systems & Applications Weblog
ALTER TABLE TEST_UQ ADD COL3 AS (CASE WHEN COL2 IS NULL THEN CAST(COL1 AS NVARCHAR(10)) ELSE COL2 END);