How to create a Unique (Index) constraint across multiple tables?
You could use a sequence for generating the values for ID fields. The documentation explicitly mentions your use case. The example C on said page has a sample implementation about this.


  Use sequences instead of identity columns in the following scenarios:
  
  
  The application requires sharing a single series of numbers
  between multiple tables or multiple columns within a table.
  


Be aware that there are a few catches. For example, sequence values are reusable, are not unique by default and can contain gaps. Pay attention to the Limits part in the docs.