# msserver Foreign key to a unique constraint not supported?

**URL:** <https://forum.liquibase.org/t/msserver-foreign-key-to-a-unique-constraint-not-supported/1972>\
**Category:** General Discussion\
**Created:** [May 15, 2012, 7:37pm UTC](https://forum.liquibase.org/t/msserver-foreign-key-to-a-unique-constraint-not-supported/1972 "2012-05-15T19:37:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [May 15, 2012, 7:37pm UTC](https://forum.liquibase.org/t/msserver-foreign-key-to-a-unique-constraint-not-supported/1972/1 "2012-05-15T19:37:00Z")

</div>

Hello,

When I attempt to add a foreign &nbsp;key constraint to a unique constraint (not a pk, thought it is not null and unique), I get the error: addFroeignkey not supported on msserver.

The sqlserver is sqlserverexpress 2012 and the jdbc driver is sqljdbc4.jar, got the latest from Microsoft sites.

I did not find it in any documentation that it does not work,

Am I doing something wrong here?

- Anu
