0

I have written the following query to delete 100 rows only:

delete T1 from table1 T1
INNER table2 T2 ON
T1.column1 = T2.column1
where T2.id IN(select id from table2 where date >= '2001-01-01' limit 100)

I am getting an error This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'

all_techie
  • 2,761
  • 2
  • 11
  • 19

1 Answers1

0

Instead of in you can use join delete T1 from table1 T1 INNER table2 T2 ON T1.column1 = T2.column1 JOIN (select id from table2 where date >= '2001-01-01' limit 100) AS temp On temp.id =T2.id