471,083 Members | 1,130 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,083 software developers and data experts.

DELETE question

Hi there

I want to creat a SQL statment that deletes all records but the first 7
i have tried
DELETE FROM dbtable LIMIT 8,100

but it didn't work, what is the corret way?

Thanks

Brian


Jul 20 '05 #1
2 1606
Brian wrote:
Hi there

I want to creat a SQL statment that deletes all records but the first 7
i have tried
DELETE FROM dbtable LIMIT 8,100

but it didn't work, what is the corret way?


define "first 7".
Based upon which metric/column/criteria?

The "best" course is to move the scared 7
to a new table; delete all the records,
then move the scared 7 back to orginal table.

Jul 20 '05 #2
Brian wrote:
Hi there

I want to creat a SQL statment that deletes all records but the first 7
i have tried
DELETE FROM dbtable LIMIT 8,100

but it didn't work, what is the corret way?


define "first 7".
Based upon which metric/column/criteria?

The "best" course is to move the scared 7
to a new table; delete all the records,
then move the scared 7 back to orginal table.

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Matan Nassau | last post: by
16 posts views Thread by robert | last post: by
12 posts views Thread by yufufi | last post: by
10 posts views Thread by jeffjohnson_alpha | last post: by
29 posts views Thread by =?Utf-8?B?R2Vvcmdl?= | last post: by
7 posts views Thread by subramanian100in | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.