Tuesday, 27 May 2014

select or delete duplicate from table using sql query

delete FROM TableName
WHERE Col1 NOT IN
(
SELECT MAX(colid)
FROM TableName
GROUP BY Col1 )

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...