--向下查询 WITH RECURSIVE res AS ( union ALL SELECT t_tree.* FROM t_tree, res WHERE t_tree.pid = res.id ) OFFSET ();--分页 --向上 WITH RECURSIVE res AS ( union ALL SELECT t_tree.* FROM t_tree, res WHERE t_tree.id = res.pid --select * from t_tree where t_tree…
select * from users order by score desc limit 3;--取成绩的前3名=====select * from users order by score desc limit 3 offset 0;--取成绩的前3名 select * from users order by score desc limit 3 offset 1;--从第二名开始往后取前三名.…
写这篇文章的初衷是因为其他的业务系统要调用sharepoint的文档库信息,使其他的系统也可以获取sharepoint文档库的信息列表.在这个过程中尝试过用linq to sharepoint来获取文档列表,不过看了其他人对linq在sharepoint的分页效率的评价,不是很好,详情请戳这里.所以尝试用CAML来分页,在此记录以备忘.测试了一下,两万条分页毫无压力. 代码如下: using System; using Microsoft.SharePoint; using Microsoft.…