-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: create UNIQUE indexes in Microsoft SQL Server
PostPosted: Tue Dec 28, 2010 8:21 am 
Newbie

Joined: Tue Dec 28, 2010 8:07 am
Posts: 1
We want to create unique indexes on some Microsoft SQL Server tables, indexes formed by two table fields (not part of the table key), we can create them but they are not marked as UNIQUE, we have to mark them UNIQUE manually or by an sql script. Is there to create them with the UNIQUE flag activated?

We have tested setting unique=”true” on both fields but with no success. Any suggestion?

Thanks in advance.


<class name="ToolbarProperty" table="TOOLBAR_PROPERTY">

<id name="id" column="ID">
<generator class="identity"/>
</id>

<property name="value" column="VALUE" not-null="true"/>

<many-to-one name="toolbar" column="TOOLBAR_ID" class="Toolbar" index=”index1”/>
<many-to-one name="toolbarTypeProperty" column="TOOLBAR_TYPE_PROPERTY_ID" class="ToolbarTypeProperty" index=”index1”/>

</class>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.