I have a Contract table with a CoverageCode column. I what pull 5 records for each CoverageCode. Currently I am doing this:SELECT TOP 5 * FROM Contract WHERE CoverageCode = 1UNIONSELECT TOP 5 * FROM Contract WHERE CoverageCode = 2etc.....there are over 100 if I go this routeIs there a better way to do this?
↧