您需要根据您的要求使用where条件,如下所示:
delete from mytable where id in(1,2,3,4,5,6,7,8,9,10)
要么
delete from mytable where id in(select id from mytable where someconditon)
DELETE FROM mytable WHERE ctid IN ( SELECT ctid FROM mytable GROUP BY s.serialId,s.valuetimestamp ORDER BY s.serialId LIMIT 10 )
如果您要从表中删除重复项,请尝试以下操作:
DELETE FROM mytable WHERE ctid NOT IN (SELECT MAX(s.ctid) FROM table s GROUP BY s.serialId,s.valuetimestamp);