sql - Finding One record from table having unique PK and duplicate FK -


i want 1 record table having unique primary key , duplicate foreign key

please see attached image below

alt text http://img413.imageshack.us/img413/9940/findduplicate.png

thanks

select fk, count(*)  table1 group fk having count(*) > 1 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -