Maybe you could use a trigger, as below, or else you could just apply the condition on each insert.USE tempdbGOCREATE TABLE dbo.MotherBoardTransistors( MotherBoardID int NOT NULL ,TransitorID int NOT NULL ,XL int NOT NULL ,YL int NOT NULL ,XU int NOT NULL ,YU int NOT NULL)GOCREATE TRIGGER MotherBoardTransistorsIUON dbo.MotherBoardTransistorsAFTER INSERT, UPDATEASIF EXISTS ( SELECT * FROM dbo.MotherBoardTransistors T JOIN inserted I ON T.MotherBoardID = I.MotherBoardID AND T.TransitorID <> I.TransitorID AND ( I.XL BETWEEN T.XL AND T.XU OR I.XU BETWEEN T.XL AND T.XU ) AND ( I.YL BETWEEN T.YL AND T.YU OR I.YU BETWEEN T.YL AND T.YU ) )BEGIN RAISERROR ('Transistor Overlap.', 16, 1) ROLLBACKENDGOINSERT INTO dbo.MotherBoardTransistorsSELECT 1, 1, 0, 0, 2, 1GOINSERT INTO dbo.MotherBoardTransistorsSELECT 1, 2, 5, 0, 8, 2GOINSERT INTO dbo.MotherBoardTransistorsSELECT 1, 3, 1, 0, 3, 2 GO--DROP TABLE dbo.MotherBoardTransistors