I\'m trying to port some old MySQL queries to PostgreSQL, but I\'m having trouble with this one:
DELETE FROM logtable ORDER BY timestamp LIMIT 10;
If you don't have a primary key you can use the array Where IN syntax with a composite key.
delete from table1 where (schema,id,lac,cid) in (select schema,id,lac,cid from table1 where lac = 0 limit 1000);
This worked for me.