1、distinct 剔除重复,count(1),查询重复的行数,group by having 相当于where
select distinct deptid,siteid,updownid,devicecode,count(1) from j_device where deptid=1398 and siteid=1189 and updownid=1 and statue=0 and DevClassId in (select DevClassId from j_devclass where DevClassCode like '01-0900%') group by deptid,siteid,updownid,devicecode having count(1)>1
2、t.rowid 可以在编辑器中,进行编辑
select t.*,t.rowid from B_R_REPAIRECONFIG t where devtype=1 and status=1 order by REPAIRECONFIGID;