Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

USE [Tele20]

GO

CREATE NONCLUSTERED INDEX [Mobile] ON [dbo].[Table_Tele]

[Mobile] ASC

)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF,


DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
[PRIMARY]

GO

CREATE NONCLUSTERED INDEX [CNIC] ON [dbo].[Table_Tele]

[CNIC] ASC

)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF,


DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
[PRIMARY]

GO

WITH CTE_Tele AS

SELECT *, ROW_NUMBER() OVER (PARTITION BY [Mobile] ORDER BY [Mobile] ) AS RN

FROM Table_Tele

DELETE FROM CTE_Tele WHERE RN>1

You might also like