About Me

My photo
I am an MCSE in Data Management and Analytics, specializing in MS SQL Server, and an MCP in Azure. With over 19+ years of experience in the IT industry, I bring expertise in data management, Azure Cloud, Data Center Migration, Infrastructure Architecture planning, as well as Virtualization and automation. I have a deep passion for driving innovation through infrastructure automation, particularly using Terraform for efficient provisioning. If you're looking for guidance on automating your infrastructure or have questions about Azure, SQL Server, or cloud migration, feel free to reach out. I often write to capture my own experiences and insights for future reference, but I hope that sharing these experiences through my blog will help others on their journey as well. Thank you for reading!

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