Questions tagged [delete-row]

Delete row refers to the removal of rows from a relational database.

The deletion can be achieved by using the DELETE statement of the SQL language.

1917 questions
4
votes
3 answers

How to delete a selected row from datagridview and database

The idea is that the row that is selected when deleted gets removed from datagridview, database and then datagridview gets refreshed. I assume it has to be done with SQL but how would you link that sqlcommand of type text with a delete code with…
EricTheSwift
  • 41
  • 1
  • 1
  • 2
4
votes
1 answer

PHP - How to verify record deleted successfully

This is the code I'm using for deleting row from my DB:
4
votes
3 answers

Deleting rows (working backwards), but use a range variable?

Often times it's required that you go through a range of cells, and based on some criteria, delete an entire row. In practice, it's best to start at the end of the range, and work up. Dim i as Long For i = lastRow to 1 Step -1 If Cells(i,…
BruceWayne
  • 22,923
  • 15
  • 65
  • 110
4
votes
1 answer

How to prevent bulk row deletion operations?

I can prevent DELETE completely like this: CREATE TRIGGER prevent_multiple_row_del BEFORE DELETE ON ALL BEGIN RAISE EXCEPTION 'Cant delete more than 1 row at a time'; END; But how do I check if the delete operation will lead to deletion of multiple…
player87
  • 1,781
  • 1
  • 14
  • 21
4
votes
2 answers

delete an example from dataframe pandas python

i have a dataframe like this Phrase Sentiment [ good , movie ] positive [wooow ,is , it ,very, good ] positive [] negative [] …
Amal Kostali Targhi
  • 907
  • 3
  • 11
  • 22
4
votes
1 answer

Delete Every even(uneven) row from a dataset

What is the most elegant way to delete every even/uneven row from a data-frame in R? My first try was to enter the numbers of every second row "by hand" (See below) (SmallerDataFrame <- OriginalDataFrame[-c(2,4,6,8,10,12),])
Ferdi
  • 540
  • 3
  • 12
  • 23
4
votes
1 answer

Create new CSV that excludes rows from old CSV

I need guidance on code to write a CSV file that drops rows with specific numbers in the first column [0]. My script writes a file, but it contains the rows that I am working to delete. I suspect that I may have an issue with the spreadsheet being…
JCM
  • 365
  • 1
  • 2
  • 15
4
votes
1 answer

EntityFramework 6.0 generating one DELETE per row

I'm deleting about 5000 rows of my table on a clustered index, and EF takes almost 30 seconds to do it. Logging the generated SQL shows it's doing one delete for every row: DELETE [dbo].[Table] WHERE ([ColumnID] = @0) So there are 5000 transactions…
FBryant87
  • 4,273
  • 2
  • 44
  • 72
4
votes
3 answers

What is the faster way to delete old records

I have a table with about 35 million rows. each has about 35 integer values and one time value (last updated) The table has two indexes primary - uses two integer values from the table columns Secondary - uses the 1st integer from the primary +…
Nir
  • 24,619
  • 25
  • 81
  • 117
4
votes
2 answers

Python: How to get number of rows deleted with MySQLdb

I have this below code which deletes all the rows in a table whose date column value is current_date. db = MySQLdb.connect("localhost",'root','XXXX','XXXX') cur = db.cursor() query = "delete from RealTimeData where date =…
Chiyaan Suraj
  • 1,021
  • 2
  • 13
  • 27
4
votes
2 answers

PHP delete button... doesn't work(modal)

Can someone tell me what I'm doing wrong here? I create a table which has a delete button in each row, when clicked pops up an modal and asks if I want to delete the row. But when i click on the button nothing happens. Why is this happen?(I suspect…
Kowts
  • 77
  • 3
  • 12
4
votes
2 answers

JPA Native Query delete in

I try to delete a list of rows from a table using this Native Query: @NamedNativeQuery(name="WebGroup.DeleteIn", query="DELETE FROM WebGroup WHERE WebGroup.GROUP_ID IN (:IDsList)" getEm().createNamedQuery("WebGroup.DeleteIn") …
Fabio B.
  • 970
  • 2
  • 14
  • 29
4
votes
2 answers

Django and AJAX: Delete Multiple Items wth Check Boxes

I have seen several posts that describe deleting items in Django with views and check boxes. I have accomplished deleting single items with AJAX. My current problem is that I cannot figure out how to delete multiple items with check boxes and AJAX…
nicorellius
  • 3,715
  • 4
  • 48
  • 79
4
votes
1 answer

UIButton & UITextField will block UITableViewCell being swipe to delete

There are UIButton and UITextField in the UITableViewCell. The delete button will not come up when I swipe over UIButton or UITextField. I do search for the answers on SO and google, there is a similar questions Swipe left gestures over UITextField,…
lu yuan
  • 7,207
  • 9
  • 44
  • 78
4
votes
1 answer

TClientDataSet Traverse & Delete record cause some record being traverse twice in the while-loop (If with Index)

I have the following code which traverse all data in the TClientDataSet, my purpose is to delete all records except DocKey=20381. But with the following codes, you will notice record with DocKey=20381 being traversed twice (traverse times = 6,…
Sherlyn Chew
  • 189
  • 1
  • 2
  • 8