About Me

My photo
I am MCSE in Data Management and Analytics with specialization in MS SQL Server and MCP in Azure. I have over 13+ years of experience in IT industry with expertise in data management, Azure Cloud, Data-Canter Migration, Infrastructure Architecture planning and Virtualization and automation. Contact me if you are looking for any sort of guidance in getting your Infrastructure provisioning automated through Terraform. I sometime write for a place to store my own experiences for future search and read by own blog but can hopefully help others along the way. Thanks.

Is Unique-NonClustered index also is HEAP Table




Somebody questioned me long back that is Unique-NonClustered Index is also a HEAP Table.
I said yes..
Explanation below:

USE [AdventureWorks2012_old]
GO

/****** Object:  Table [dbo].[Employee]    Script Date: 2/25/2013 11:06:23 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Employee](
       [Empid] [int] IDENTITY(1,1) NOT NULL,
       [EmpFName] [char](10) NULL,
       [EmpLName] [char](10) NULL,
       [Salary] [int] NULL,
CONSTRAINT [IX_Employee] UNIQUE NONCLUSTERED
(
       [Empid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING ON
GO
go

select OBJECT_NAME(object_id),type_desc from sys.indexes where type_desc ='HEAP'
  go