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
1 answer

Deleting multiple MySQL items using checkboxes

I have a form that enables user to select several items:
Jan Mares
  • 57
  • 9
3
votes
1 answer

Laravel MySQL Error 1054

I have this little annoying problem trying to delete a row in a paginated grid in Laravel, which worked fine a few days ago, and NOW, i'm getting this problem in all my grids whenever I try to delete any record. Here's an example of the…
arrigonfr
  • 742
  • 3
  • 12
  • 34
3
votes
3 answers

How to do DB2-SQL delete top N … in AS400

SELECT * FROM DB FETCH 100 ROW ONLY -> is ok. delete from DB FETCH 100 ROW ONLY -> why not?
user3374083
  • 31
  • 1
  • 2
3
votes
2 answers

Deleting duplicates of tables

In my activity_logs, it contains columns: material_name, user_id, mod_result (this marks a test if Pass/Fail), cert_links. Somehow the users generate twice the entry of the material_name with the cert_links column left blank. I can list duplicates…
3
votes
1 answer

Sqlite delete incredibly slow - How to speed up?

I read that delete operation is slow and I was wondering how can I improve this check. I have a table which is filled by 10-15k rows every day and every startup I need to clean all records older than 6 months but when the database grows, I start to…
Riccardo Neri
  • 790
  • 1
  • 11
  • 24
3
votes
1 answer

Delete rows with duplicate value in one column but different value in another column

I have a table in MariaDB 5.5 that looks like this: | PRODUCT_ID | STORE_ID | ------------------------- | 111 | 0 | | 111 | 1 | | 112 | 0 | | 112 | 1 | | 113 | 0 | | 114 | …
3
votes
4 answers

SQL delete orphan

Assuming that all foreign keys have the appropriate constraint, is there a simple SQL statement to delete rows not referenced anywhere in the DB? Something as simple as delete from the_table that simply skip any rows with child record? I'm trying to…
RichN
  • 6,181
  • 3
  • 30
  • 38
3
votes
1 answer

Delete Rows based on another table with key having multiple columns

There are many queries regarding deleting table records based on another table. But non of them did not work for my scenario. I am using sqlite3 I have 2 tables with same name in 2 dbs. DB1: CREATE TABLE OwnerService1Table1 ("key1" TEXT,"key2"…
Nasir
  • 708
  • 2
  • 11
  • 28
3
votes
2 answers

ORA-00903 invalid table name error when deleting rows from a table

I have a table in oracle that I was to delete the contents of, but when I try to delete I get ORA-00903: invalid table name as if it didn't exist. I know it exists because selecting all the rows works. here I describe the table then try and delete…
whatahitson
  • 355
  • 1
  • 9
  • 26
3
votes
1 answer

COUNT(*) takes long even after deleting all rows

I have the following table: CREATE TABLE Sdata(uid INTEGER, timestamp DATETIME, value REAL, FOREIGN KEY (uid) REFERENCES Series_uid(uid)); At one point, this table had ~90M rows. I queried for SELECT COUNT(*) FROM Sdata; which took about 7…
leonsas
  • 4,718
  • 6
  • 43
  • 70
3
votes
1 answer

XCODE TableView with multiple sections and delegate datasource from array of arrays - can't delete row without error?

I have a TableView with multiple sections that's got a delegate Data Source which links to an array of arrays. Each array within the array of arrays is it's own Table View Section. I have it loading up correctly and have an edit button enabled but…
3
votes
3 answers

SQLite delete one single row

I have a SQLite table defined this way: CREATE TABLE Points(value INTEGER, player INTEGER, match INTEGER) In the execution, I may have several identical columns, and I want a call which only deletes one, not all of them nor keeping just one. Is…
user1897262
  • 85
  • 1
  • 3
  • 10
3
votes
4 answers

Delete cells without shifting them up

I have vba macro to delete a selection of cells. Its shifting the cells up automatically after deleting them. I don't want the cells to be shifted up, as I have a chart below the cells and everything gets disturbed if they are shifted. Here is the…
Jill448
  • 1,745
  • 10
  • 37
  • 62
3
votes
1 answer

How do I delete one or more rows from my table using Linq to Entities *without* retrieving the rows first?

I understand I can map a delete stored procedure to the delete method for a particular type. However, this requires passing in a retrieved object to my context's DeleteObject method. This is bad enough, but what if I want to delete 2000 rows? Can I…
joshcomley
  • 28,099
  • 24
  • 107
  • 147
3
votes
2 answers

How to automatically delete rows that contain a date with more than 3 days offset to the past from now?

I am trying to get a script going that will automatically delete rows with a date over 3 days old (4 days on) I found this script that I was hoping to be able to adapt: function DeleteOldEntries() { var ss =…
user2207314
  • 41
  • 1
  • 6