• Yep, indexed views are the answer. You can join the two tables in a view and create a unique clustered index on the view for the required columns. It will then throw a unique constraint violation when either table is updated in a way that violates the constraint.

    What are you struggling with?

    edit: Actually, surely it would be more simple to just increment your numbers in the two tables from a different range and use a check constraint on both tables to ensure there is no overlap.