select * from 表 a
where not exists(select * from 表 where a=a.a and c>a.c)
where not exists(select * from 表 where a=a.a and c>a.c)
解决方案 »
- 触发器
- 请问取最后N条记录的语句怎么写?
- sqlServer2005的发布订阅(合并复制),无法创建新表,新列,与视图。
- 数据库中如何避免误操作?
- 存在的纪录不允许插入
- 'textcopy' 不是内部或外部命令,也不是可运行的程序?怎么回事?
- 请问,ID 字段应该用什么数据类型?谢谢!
- 在SQL Server 7.0里如何把数字格式化,如输入7(int)得到 0007(char)
- 数据库软件加密?
- HAVING 使用中遇到小问题
- 求救:关于如何新建立一个试图??具体见内容。。。。。。。。
- 把MSServer的数据导到Access,可含有text字段的表内容导不过去,请问该怎么办?马上结贴,谢谢!
select * from 表 where a=a.a and c>a.c 这句是什么意思啊!!
好象经常有这种的问题!!
where c in(select top 1 c from tab where a=a.a order by c desc)
order by a asc
是查找是否有比当前记录C值大且A相同的记录