Top "Sql-delete" questions

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

Sqlite how delete last added entry of a table

I'm trying to delete the last added entry of a table: DELETE FROM notes ORDER BY created_at DESC LIMIT 1 …

sqlite sql-delete
MySQL Getting around error 1093

Error 1093 states that you can't UPDATE or DELETE using a subquery if your subquery queries the table you are deleting …

mysql sql sql-update sql-delete mysql-error-1093
PL/SQL - Delete current record in FOR IN LOOP

I am trying to figure out how to delete a record using the FOR .. IN .. LOOP FOR REC IN (SELECT * …

sql oracle plsql sql-delete for-in-loop
Delete from table if the id doesn't exists in another table

I want to delete the id's from types that can't be found in types_photos but I don't know how …

sql sql-delete multiple-tables
how to solve this- Cannot delete or update a parent row: a foreign key constraint fails

I'm trying to drop table and I'm getting this error : Cannot delete or update a parent row: a foreign key …

mysql sql-delete drop-table
Does TRUNCATE TABLE grows up transaction log?

I have read that one of the differences between DELETE and TRUNCATE TABLE in Sql is the TRUNCATE operation cannot …

sql sql-delete truncate transaction-log
Deleting records having a date older than 3 days, for rolling 3 day job?

Prior to executing a sensitive sql command I wanted to do a sanity check. I am trying to delete records …

sql-server-2005 datediff sql-delete
MySQL DELETE all but latest X records

I have a script that runs every hour on my php site. In that script I would like some kind …

mysql sql-delete records
Laravel 5.4 - Deleting specific records from the pivot table

For each visit I may have many products; therefore the pivot table (product_visit) has the fields: id, product_id, …

php laravel many-to-many sql-delete
Delete all rows except 100 most recent ones

I am using MS SQL database and I have a table named "Logs" that looks like this: Records are added …

sql sql-server tsql datetime sql-delete