Hi psychic6000,
As you mentioned there is no such command but there is a trick to implement such a relation.
You can add tree computed fields in addition to X and set their persisted attribute to ON , for making it possible to define them as a foreign key.
Their formula is something like this :
case when [x]%(3)=(0) then [x] end
The whole table looks like this :
CREATE TABLE [test].[main](
[id] [int] IDENTITY(1,1) NOT NULL,
[value] [int] NOT NULL,
[value_mirror1] AS (case when [value]%(3)=(0) then [value] end) PERSISTED,
[value_mirror2] AS (case when [value]%(3)=(1) then [value] end) PERSISTED,
[value_mirror3] AS (case when [value]%(3)=(2) then [value] end) PERSISTED
) ON [PRIMARY]
after this you can define a relation between value_mirror1 and table1 id and so on ...
This gives you a consistency to an acceptable extent.
Hope this helps.
EDIT: if you get ARITHABORT error when editing your table : right click on your database in SSMS select properties in OPTIONS section set
Arithmatic Abort Enabled to True.