select zjm from xskh where guid_yw='e6ee44f3-98ab-4446-bd9b-db2e525d3b24' and zjm not like '%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]%'--不包含a-z字母 select * from xskh where (ISNUMERIC(aname_long)=1 or isnull(aname_long,'')='')--ISNUMERIC 函数是判断该字段的值是否为数字是=1不是=0 ,但…
1.查询重复值: select code,count(*) as count from hospital group by code having count>1; 该语句查询code重复值大于1的记录 2.删除重复: DELETE FROM hospital WHERE id NOT IN (SELECT dt.minno FROM (SELECT MIN(id) AS minno FROM hospital GROUP BY code) dt); 该语句保留id最小的记录,其余code重复的…
sql SELECT COUNT(字段),分组字段,SUM(字段),SUM(字段) FROM 表 GROUP BY 分组字段 java EntityWrapper<ProjectEntity> pp= new EntityWrapper<ProjectEntity>(); pp.eq("depcode", community); int proc = projectService.selectCount(pp); pp.setSqlSelect("CO…