For a rst-order language L, the Herbrand universe consists of ground terms of L. We deened 15, 16, 17] an !-Herbrand universe for L by introducing the following modiication: rst add to L countably many new individual constants, and then form the set of all ground terms of the resulting language. Newly added constants make this universe \open" and suitable for modeling those situations in databases where not all entities are known in advance. In this research we investigate the theory of equality determined by !-Herbrand interpretations, we give its axiomatization, and prove that it is complete and decidable. For a formula 9xB, the decision algorithm not only tells whether this formula is a consequence of our equality theory, but also computes substitutions such that B is true in all !-Herbrand interpretations. To put these results in a broader context, let us mention that algorithm above can be used to generate answer substitutions in a logic programming language which admits as constraints arbitrary rst-order formulas built from equalities of terms. Unlike in currently implemented logic programming languages, such constraint solving mechanism guarantees that equality is understood as in the rst order logic, and treated in a fully declarative way. This approach has a potential for being combined with the others, as well as a potential for parallelization.