4) Open a cursor on table A restricted to those 100 records (same restriction as in your statement of step 1) 5) iterate over the cursor, retrieve the PK value for the record (assuming you don't ...
Comparing cursor vs. WHILE loop performance in SQL Server 2008 Your email has been sent Tim Chapman discusses your iteration choices in SQL Server 2008 and explains why determining which option ...