Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delete with no index? 1

Status
Not open for further replies.

Yerdon

Programmer
Jul 29, 2002
62
US
Hi,

How can I delete a certain number of rows from a table with no key field? Something like:

DELETE TOP 292166 FROM TABLENAME

This is a table I just imported into and I need to delete the first few hundred thousand rows and leave the rest.

Any ideas?

Thanks!

Joseph
 
One way is to use ROWCOUNT . Don't forget to reset the ROWCOUNT back to zero when finished


Code:
SET ROWCOUNT 292166
delete from theTable
SET ROWCOUNT 0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top