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
3
votes
4 answers

Looping through rows in a ListObject to delete them is very slow

I have a ListObject table with ~500 rows, I've also got 4 values in a named range. There are maybe 30 unique values that occur repeatedly (At random) for the 500 rows, I want to delete all rows whose values are not in the named range. I have the…
Kieran
  • 89
  • 1
  • 13
3
votes
3 answers

Trying to delete selected row from datagridview but it is deleting multiple rows

It is a simple question, but since I am new to C#, I am not sure how to solve this. Basically, I have a datagridview that displays records from MySQL table. I have a delete button, which by clicking performs the sql query, which is working fine, and…
3
votes
3 answers

SQL: Deleting row which values already exist

I have a table that look like this: ID | DATE | NAME | VALUE_1 | VALUE_2 1 | 27.11.2015 | Homer | A | B 2 | 27.11.2015 | Bart | C | B 3 | 28.11.2015 | Homer | A | C 4 | 28.11.2015 | Maggie | C | B 5 |…
JuGuSm
  • 33
  • 7
3
votes
2 answers

Deleting multiple rows by ids and checking if those ids are not in other tables

I have a list of ids that i want to delete but i have to check if those ids are not in other tables first.If they are i want to insert those ids in to another list separated by columns. Assuming @keywords to be the list of ids. SELECT…
Sana Ahmed
  • 462
  • 3
  • 25
3
votes
1 answer

Delete rows in Dataframe based on condition

Let us say I have a dataframe : first_df = pd.DataFrame({"company" : ['abc','def','xyz','lmn','def','xyz'], "art_type": ['300x240','100x600','400x600','300x240','100x600','400x600'], …
Data Enthusiast
  • 521
  • 4
  • 12
  • 22
3
votes
2 answers

Kendo grid delete button passing the details of the row

I have a kendo grid in which I want to form delete button to pass the details of the row to the controller (as I am using mvc). Then I will use these details to delete the row from the database. I searched in kendo website and I found the part for…
KamalF
  • 105
  • 1
  • 3
  • 19
3
votes
2 answers

How to Delete data from one table using joins in Oracle?

I'm trying to delete data's from one table with join condition. I tried this Delete test_one from test_one Val join test_two En on Val.Map_Fromphyid=En.Fromphyid And …
Arun Palanisamy
  • 5,281
  • 6
  • 28
  • 53
3
votes
5 answers

MySQL: delete table rows if string in cell is matched?

I have a table with a column meta_key … I want to delete all rows in my table where meta_key matches some string. For instance I want to delete all 3 rows with "tel" in it - nut just the cell but the entire row. How can I do that with a mysql…
matt
  • 42,713
  • 103
  • 264
  • 397
3
votes
4 answers

Making one table equal to another without a delete *

I know this is bit of a strange one but if anyone had any help that would be greatly appreciated. The scenario is that we have a production database at a remote site and a developer database in our local office. Developers make changes directly to…
Josh Atkins
  • 223
  • 1
  • 8
3
votes
1 answer

MySQL delete row after 'expiry'

I am trying to delete expired entries in a MySQL database, on creation or update a field called lastBeat is updated with CURRENT_TIME and I use the following query to check/delete rows older than 20 seconds: DELETE * FROM `rmachines` WHERE …
Paul Ridgway
  • 1,055
  • 2
  • 13
  • 23
3
votes
1 answer

asp.net mvc diff between DeleteAllOnSubmit and deleteonSubmit

What is the real difference b/w DeleteAllOnSubmit and deleteonSubmit and which one is more appropiate to use?
maztt
  • 12,278
  • 21
  • 78
  • 153
3
votes
1 answer

mysql delete with inner joins and limit

This is the only way I could think of doing this and I am getting an error about the limit. I am trying to delete in chunks within the while loop as the result total might be quite large. The first count statement works fine. It is the second,…
user756659
  • 3,372
  • 13
  • 55
  • 110
3
votes
3 answers

Deleting records in LINQ with foreign keys - invalid cast exception

I have a simple database: ARTICLE ---------- ArticleId (PK), ArticleTitle ..other stuff... USER-ARTICLE ------------ ArchiveId (PK), UserId, ArticleId ..other stuff... The articleId's are foreign keys. I want to be able to delete a user article…
Chris James
  • 11,571
  • 11
  • 61
  • 89
3
votes
4 answers

Use Delete Button to Delete Record from Database

I have a database containing books. On a page, I have loop that prints each record in the database which each book's title, author, publisher, date, and rating. I want to use a delete button at the bottom of each record in order to delete it. When…
Stephane
  • 71
  • 2
  • 11
3
votes
2 answers

Deleting multiple rows based on where clause using FluentMigrator

Given a Payment table, a PaymentStatus table, and a PaymentHistory table, I need to delete a status from the PaymentStatus table that the Payment and PaymentHistory tables have associated records for. So naturally that means delete the history table…
MegaMark
  • 600
  • 8
  • 26