Solved

Constraint Not Showing Under "Constraints" in Management Studio

Posted on 2006-11-02
4
727 Views
Last Modified: 2013-12-03
I created a new table like this:

IF OBJECT_ID('MyTables') IS NULL
CREATE TABLE MyTables (
id INT IDENTITY (1,1),
SomeName VARCHAR(20) NOT NULL CONSTRAINT UniqueSomeName UNIQUE (SomeName)
);

Now, when I got to Management Studio (2005), the constraint does not show under the "Constraints", but it does show under the "Indexes" and "Statistics". Am I doing something wrong?
0
Comment
Question by:GivenRandy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 17859057
a UNIQUE constraint is implemented by a UNIQUE INDEX. hence it shows up there...
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17859059
>Am I doing something wrong?
no
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17859079
Check for that one in indexes
0
 
LVL 9

Author Comment

by:GivenRandy
ID: 17859399
LMAO -- Of course. Thanks!
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question