Hi,
I have a table with a primary key and a unique index on it. The schema reader picks up the PK, but does not recognize the unique key. I am using MSSSQL 2012. I checked IsUnique and also used the method DatabaseIndex.IsUniqueKeyIndex(<table>).
The DDL is as follows:
CREATE TABLE [dbo].[Customers](
(
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
CREATE UNIQUE NONCLUSTERED INDEX [UNQ_Customers_Name] ON [dbo].[Customers]
(
Any suggestions?
Thanks a lot,
Alessandro
I have a table with a primary key and a unique index on it. The schema reader picks up the PK, but does not recognize the unique key. I am using MSSSQL 2012. I checked IsUnique and also used the method DatabaseIndex.IsUniqueKeyIndex(<table>).
The DDL is as follows:
CREATE TABLE [dbo].[Customers](
[Id] [int] NOT NULL,
[FirstName] [varchar](15) NOT NULL,
[MiddleInitial] [varchar](1) NULL,
[LastName] [varchar](20) NOT NULL,
[Age] [int] NULL,
[Description] [text] NULL,
[Company] [varchar](30) NULL,
CONSTRAINT [PK_Customers] PRIMARY KEY CLUSTERED (
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
CREATE UNIQUE NONCLUSTERED INDEX [UNQ_Customers_Name] ON [dbo].[Customers]
(
[FirstName] ASC,
[MiddleInitial] ASC,
[LastName] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]Any suggestions?
Thanks a lot,
Alessandro