Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

remove duplicate values

$
0
0

hi this is my sql server table

ID  RID  Val  PID

1   1      a     null

2   1      b     null

3   2      g     1

4   2      h     1

5   2      i      1

6   2      g     1

i want to remove the duplicate rows where (RID=2) and need to set PID=null for non duplicate rows


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>