select * from test group by id,num,t having count( *)>1 表为 id,num,t
表结构: id,num,t num是字符,t也是字符,id是数字 .表结构: id,num,t num是字符,t也是字符,id是数字 可以采取这样的逻辑写出符合自己表结构的语句
下面是搜索某写字段值重复的方法,
select * from test where num||'##'||t in (select num||'##'||t from test group by num,t having count(*)>1)