也就是说,找不同cocode值的唯一的第一条记录
解决方案 »
- 如何删除表中因为某个字段重复的行
- 输入一个销售商id,通过游标的使用,删除此销售商的所有出货记录,并更新库存量
- SQL2000中如何实现创建的表和现实时间一致的问题?
- 小问题:联合主键是这样的含义吗?
- 分离数据库的问题
- 请教: 表A和表B中分别有字段ypid,表A中某个记录的ypid字段内容改变后,怎么样使表B中ypid字段中和表A具有相同的内容的记录也会自动改变
- 向各位高手请教:什么情况才需要分表?分表的原则是什么?
- 关于exec的最新问题
- 我的机器上有好几个TNSNAMES.ORA文件,我刚建了一个数据源,不知道那一个TNSNAMES.ORA和它对应。
- FoxPro/SQL/ sele khmxb.大类,sum(ccd.实收) as 总收 from ccd,khmxb group by ccd.卡号,khmxb.卡号 where khmxb.卡号=ccd.卡号
- 怎样把别的数据库中的表导入到我的数据库中
- 求救:Ms-SQL 與 MySQL 維護上 、安全機制、資料處理 區別的材料
select * from dictform a
where not exists(
select * from dictform where cocode=a.cocode and Uptime>a.Uptime)
select a.*
from dictform a,(select cocode,Uptime=max(Uptime) from dictform group by cocode)b
where a.cocode=b.cocode and a.Uptime=b.Uptime
from dictform
group by cocode
前提:select identity(int,1,1) as myid,* into #t from dictform1.select distinct cocode ,AboutReason, Uptime from #t where myid=(select min(myid) group by cocode)
2.select * from dictform a
where not exists(
select * from dictform where cocode=a.cocode and myid>a.id)