Hi,
I have an SQL (Microsoft SQL 2008) table with XML data in one of the columns. Each XML root node has an attribute which is a GUID.
For example:
<!--Row 1-->
<example:root id="E0B1BCEA-C0E2-4d7c-BF67-FA9A7C3FBA73">
[...]
</example:root>
<!--Row 2-->
<example:root id="13BB87F4-32A5-4de7-8CE9-E62AF002B958">
[...]
</example:root>
How is it possible to create a constraint which will ensure that this GUID is unique, i.e. there is no two rows sharing the same root/@id value?
Note: I can't neither do it at application level, nor creating a stored procedure for the insert (because it requires to change an existing application).