Find representatives of circilar references in T-SQL

If you deal with a table that has foreign key to itself, circular references may appear. The query that lists all rows with circular references is listed at the page. Sometimes it is necessary to list only representatives of each set of circular referenced rows. In the following query the first select statement orders representatives… Read More Find representatives of circilar references in T-SQL