急!!如何从数据库中有相同记录的表中,只提取相同记录中的一个? select max(id),field1 from tabel group by field1 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 distinct只对提取一个字段是有效的,我想提取id,field1两个字段值 select min(a.id),b.field1from table1 a,(select distinct field1 from table1) bwhere a.field1=b.field1group by a.id select min(id),field1 from tabel group by field1也行 select * from T a where id in (select max(id) from T where field1 = a.field1) select * from T a where a.id in (select min(id) from T where field1 = a.field1) select min(id), field1 from T group field1 PowerDesigner怎么找到英文的表名 外行求救 select error:由于绑定错误,未能使用视图或函数'v_htzf' 多线程同时调存储过程(关于临时表) 怎取不定列数(动态生成表中)的列平均值 关于使用表变量,我如何删除掉表变量中的某条记录呢? 请教一个关于分页存储过程的问题 新手求一条SQL语句,实现统计 为什么我的DELETE语句这么慢?在线求救? XP+SP2上运行sql agent请老手指教.在线等.解决就揭贴 请问谁有SQL的小写金额转大写的存储过程或函数。谢谢 数据库升级 sql server在客机应用,上一定要装客户端吗????
from table1 a,(select distinct field1 from table1) b
where a.field1=b.field1
group by a.id
from T a
where id in (select max(id)
from T
where field1 = a.field1)
from T a
where a.id in (select min(id)
from T
where field1 = a.field1)