Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I delete either the first or last set of rows in a dynamic fashion

Tags:

I would like to delete the first 100 rows or the last 100 rows in a certain table (ordered by the primary key).

Note: Lots of data is being spooled into this table.

like image 353
priya Avatar asked Jan 06 '12 07:01

priya


People also ask

How do you delete multiple rows in Excel with filters?

For this, select your work area and click on the Filter button. Select the arrow next to the header of the temporary column and uncheck the checkbox next to '0'. Select all these rows, right-click and select “Delete”. Once again remove the filters by clicking on the Filter button.

What is the shortcut to remove filtered rows in Excel?

Once the data is filtered, you can delete only the filtered rows by selecting the filtered data and pressing the "Ctrl" and "-" keys on your keyboard at the same time. This will open the "Delete" dialog box. Make sure that the "Shift cells up" option is selected and then click the "OK" button.

What is the shortcut to delete multiple rows in Excel?

Simply select the rows or columns you want to delete, and then press the Ctrl+Shift+- keys on your keyboard. All of the selected rows and columns will be deleted. You can also use this shortcut to delete multiple cells. Simply select the cells you want to delete, and then press the Ctrl+Shift+- keys on your keyboard.


1 Answers

DELETE FROM table ORDER BY the field DESC|ASC limit 100 
like image 77
Itay Moav -Malimovka Avatar answered Oct 11 '22 06:10

Itay Moav -Malimovka