Try this:
DELETE
FROM posts
WHERE id not in (
SELECT * FROM (
SELECT id
FROM posts
ORDER BY timestamp desc limit 0, 15
)
as t);
More Related Contents:
- Which DB technology is sued to solve the following search issue? [closed]
- mysql error cant fix the error [duplicate]
- MySQL pivot row into dynamic number of columns
- Host ‘xxx.xx.xxx.xxx’ is not allowed to connect to this MySQL server
- How do you set a default value for a MySQL Datetime column?
- How should I resolve –secure-file-priv in MySQL?
- node-mysql multiple statements in one query
- MySQL server startup error ‘The server quit without updating PID file’
- Select last row in MySQL
- Best type of indexing when there is LIKE clause [duplicate]
- MySQL LOAD DATA INFILE with ON DUPLICATE KEY UPDATE
- Can a number be used to name a MySQL table column?
- Difference between Key, Primary Key, Unique Key and Index in MySQL
- What’s the difference between MyISAM and InnoDB? [duplicate]
- MySQL: Split comma separated list into multiple rows
- How to start MySQL with –skip-grant-tables?
- How can I access the MySQL command line with XAMPP for Windows?
- When to use STRAIGHT_JOIN with MySQL
- Remove Primary Key in MySQL
- Difference in MySQL JOIN vs LEFT JOIN
- Get most recent row for given ID
- Is there a simple way to convert MySQL data into Title Case?
- What’s the best database structure to keep multilingual data? [duplicate]
- Using an IF Statement in a MySQL SELECT query
- How do you stop MySQL on a Mac OS install?
- Insert/ Update random date in MySQL
- How to determine which database is selected
- Replace null with 0 in MySQL
- Array data type, split string,
- How can I make a table in MySQL called “order”?