请教!消除重复纪录的
field1 field2
name1 factory1
name1 factory2
name2 factory3
name2 factory4
我要的结果是
name1,factory1
nane2,factory3
就是field2字段只取第一条纪录,
谢谢^_^
------解决方案--------------------
select * from tb a where field2=(select min(field2) from tb b where a.dield=b.field)
修改下 括号弄错了