摘要:
SELECT * from ( SELECT ROW_NUMBER() OVER(PARTITION by wj ORDER BY px desc)idx,px,wj from table ) ord where ord.idx = 1 wj :关联外键 px :排序字段 ROW_NUMBER:该函 阅读全文
摘要:
GREATEST获取最大值SELECT GREATEST(3,5,1,8,33,99,34,55,67,43);######################################################LEAST获取最小值SELECT LEAST(3,5,1,8,33,99,34, 阅读全文
摘要:
一、sql语句 DROP TABLE IF EXISTS "public"."student";CREATE TABLE "public"."student" ( "id" int4 NOT NULL, "name" varchar(255) COLLATE "pg_catalog"."defaul 阅读全文
摘要:
SELECT company.id,company.zz,snap.xydm,snap."companyName", p.xm fr from ( SELECT a.id,string_agg( case when d.zzlx = 1 then '路基路面' when d.zzlx = 2 the 阅读全文
摘要:
pgsql数据库语法 SELECT a.id,a.name as "companyName",a.xydm,a.fddbr,string_agg(case when d.zzlx = 1 then '路基路面'when d.zzlx = 2 then '桥梁'when d.zzlx = 3 then 阅读全文
摘要:
if (a.compareTo(b) == -1) { System.out.println("a小于b");}if (a.compareTo(b) == 0) { System.out.println("a等于b");}if (a.compareTo(b) == 1) { System.out.p 阅读全文
摘要:
@SqlParser(filter = true) 在mybatis-plus最新版本3.4中标记为过时 替换注解为 @InterceptorIgnore 使用方式:@InterceptorIgnore(tenantLine = "true") 基于注解的mapper查询中使用 搜索 复制 阅读全文
摘要:
SELECT * from bridge where concat(road_short_name,name,code) like '%xx镇%' 搜索 复制 阅读全文
摘要:
import com.baomidou.mybatisplus.annotation.EnumValue;import com.fasterxml.jackson.annotation.JsonCreator;import com.fasterxml.jackson.annotation.JsonV 阅读全文
摘要:
将传入的page参数的pageSize设为 -1 即可 Page page = new Page();page.setSize(-1); 搜索 复制 阅读全文