Top "Sql-delete" questions

The SQL DELETE statement allows you to delete a single row or multiple rows from a SQL table.

How can I insert the return of DELETE into INSERT in postgresql?

I am trying to delete a row from one table and insert it with some additional data into another. I …

postgresql sql-insert sql-delete
Update/delete queries cannot be typed JPA

I'm using the Spring framework for working on training projects. I'm also using JPA and have been having a hell …

java spring jpa entitymanager sql-delete
SELECT then immediately DELETE mysql record

I have a PHP script that runs a SELECT query then immediately deletes the record. There are multiple machines that …

php mysql select transactions sql-delete
Keep only N last records in SQLite database, sorted by date

I have an SQLite database that I need to do the following: Keep only last N records, sorted by date. …

sql sqlite sql-delete
Postgres slow running delete query

We have a table which has just over 62k rows. We are running a very simple delete query on it …

postgresql foreign-keys sql-delete postgresql-performance
How do I delete duplicate rows and keep the first row?

I made a mistake and I have unwanted duplicates. I have a table with 4 key fields. A1, k1, k2, k3. …

mysql sql sql-delete
MySQL DELETE FROM with UNION subquery by IN condition

I have tripped up on a curious SQL error. The last query doesn't work. Of course I can just split …

mysql subquery union sql-delete in-subquery
"The total number of locks exceeds the lock table size" Deleting 267 Records

I'm trying to delete 267 records out of about 40 million. The query looks like: delete from pricedata where pricedate > '20120413…

mysql locking innodb sql-delete
MySQL delete with nested select query

I have the following MySQL query: DELETE FROM catalogue WHERE catalogue_id IN ( SELECT catalogue_id FROM catalogue WHERE ( product_…

mysql sql-delete
MySQL, delete and index hint

I have to delete about 10K rows from a table that has more than 100 million rows based on some criteria. …

mysql query-optimization sql-delete sql-execution-plan