给定像这样的表格设置
tableA {
id = 1
name = 'bob'
id = 2
name = 'sally'
id = 3
name = 'sue'
}
tableB {
id = 1
name = 'bob'
}
如果我运行此命令,它会返回 ID 2 和 3,正如我所希望的那样:
select id
from tableA a
left join tableB b using (id)
where id not in (select id from tableB)
order by id
limit 10;
但这是一个非常大的表,所以我需要使用偏移量。当我尝试以下命令时,没有返回任何结果。
select id
from tableA a
left join tableB b using (id)
where id not in (select id from tableB)
order by id
limit 10 offset 10;
使用连接时有没有办法使用偏移?