(1) select * from student
duplicate row in table
(2)select ROW_NUMBER() over(partition by name order by name) R
,name,dob from student
R is Row number
duplicate row in table
(2)select ROW_NUMBER() over(partition by name order by name) R
,name,dob from student
R is Row number
(3)delete q from(select ROW_NUMBER() over(partition by name order by name) R
,name,dob from student)q where R>1
(4)After delete command table look like.
,name,dob from student)q where R>1
(4)After delete command table look like.
Refrence Link
No comments:
Post a Comment