79553682

Date: 2025-04-03 18:09:03
Score: 2.5
Natty:
Report link

I'm not sure I am doing this right but the code below return 0. Shouldn't it be 10?

        select @startId:= 0;

        select id 
        from tableA a 
        where id>@startId
          and   id not in (select id from tableB) 
        order by id 
        limit 10;

        select @this_id:= MAX(id) from tableA;
Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: user3052443