set rowcount 10010 select pk, id = syb_identity(10) into #tmp from big_table where some_condition select b.* from big_table b, #tmp t where t.pk = b.pk and t.id >= 10000 set rowcount 0