All Questions
6 questions
0
votes
2
answers
94
views
Delete the second record where a user has two records
I have a simple database scheme, which due to previously being badly set up has numerous duplicate records.
record_table
|--------------------------------------------------------|
| id | subid | ...
0
votes
2
answers
73
views
Create a DELETE statement that deletes Models that haven’t had a purchase since December 31st 2014
We are given 5 tables.
Orders
Order number (Primary Key)
Date of order
Customer ID (Primary Key for Customers table)
Serial Number (Primary Key for Machines table)
Customers
ID ...
6
votes
3
answers
26k
views
MySQL: Delete all but last N records
Consider the following table:
mysql> DESCRIBE pixels;
+---------------+-------------+------+-----+-------------------+----------------+
| Field | Type | Null | Key | Default ...
3
votes
1
answer
34k
views
Delete from table where multiple fields match select subquery from other table
I want to delete an entry in a table where multiple fields match the results of another select subquery which takes data from another table.
This is what I have so far, though it doesn't work:
...
4
votes
1
answer
532
views
Why is it examining 2.2 billions rows for this delete query with a subquery?
We use the community software Invision Power Suite 4.1.15. The community has 15+ million posts and we've set up the search index table it has to contain a year of posts.
We discovered the following ...
0
votes
1
answer
1k
views
How to subtract records from a table based on their existence in another
I have an Access 2010 table Assignment
key Empl Number
key Year Number
key Week Number
key Proj Number
It assigns employees to zero or more projects for given work weeks,
thus, all four ...