Suppose, I have a table like this-
Code | something
------------------
C01 abc
C02 mnt
C03 lkj
C01 dhl
C04 poi
C05 gtr
C02 rty
C01 asd
-------------------
Now, I want only those rows from the table, which rows have Code more than once in that column. So, output will be like-
Code | something
------------------
C01 abc
C01 dhl
C01 asd
C02 mnt
C02 rty
-------------------
I’m new with sql server and query things. Please, help me out.
Thanks in advance.
1 Answer