union查询

最后更新:2024-09-10 08:20:34 | 状态:未完成
RunPrepare p1 = TableBuilder.init("SSO_USER(ID, NAME)").build().condition(new DefaultConfigStore().ge("ID", 1));
RunPrepare p2 = TableBuilder.init("HR_USER(ID, NAME)").build().condition(new DefaultConfigStore().ge("ID", 2));
RunPrepare p3 = TableBuilder.init("HR_USER(ID, NAME)").build().condition(new DefaultConfigStore().ge("ID", 3));
p1.union(p2).union(p3);
ConfigStore configs = new DefaultConfigStore().order("ID", "DESC").page(5, 10);
service.querys(p1, configs);

p1 = TableBuilder.init("SSO_USER(NAME, count(*) as QTY)").build().condition(new DefaultConfigStore().ge("ID", 1).group("NAME"));
p3 = TableBuilder.init("HR_USER(NAME, COUNT(*) AS CNT)").build().condition(new DefaultConfigStore().ge("ID", 2)).group("NAME");
p1.union(p3);
configs = new DefaultConfigStore().order("NAME", "DESC").page(5, 10);
service.querys(p1, configs);
首页 最近更新 搜索 提交 回复