>HI
>
>Whats the easiest way to delete all but the top 100 rows from a table.
>
>I'm testing somehting but I don't want to shove tens of thousands of records through it yet.
>
>Thanks
>
>Nick
The simplest way will be (assuming you can truncate the table)
select top (100) * into #SaveResults from TableToClean order by SomeColumn
truncate table TableToClean
insert into TableToClean
select * from #SaveResults
drop table #SaveResults
If it's not broken, fix it until it is.
My Blog