• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 761
  • Last Modified:

Constraint Not Showing Under "Constraints" in Management Studio

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
GivenRandy
Asked:
GivenRandy
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
a UNIQUE constraint is implemented by a UNIQUE INDEX. hence it shows up there...
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>Am I doing something wrong?
no
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
Check for that one in indexes
0
 
GivenRandyAuthor Commented:
LMAO -- Of course. Thanks!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now