try:
select * from table1 (select a,b,min(c) from asd group by a,b)t
where table1.a = t.a
and table1.b = t.b
and table1.c = t.c
select * from table1 (select a,b,min(c) from asd group by a,b)t
where table1.a = t.a
and table1.b = t.b
and table1.c = t.c
解决方案 »
- 各位大大,我又来问触发器该怎么写了
- 请教:过程编译出错,要怎么改啊?
- 问个sql语句写法的问题,请诸位帮忙
- 用纯C语言写了一个HtmlParse(网页分析器)外带采集功能,大小只有200K(免费+开源+操作示意图)
- 急就高手:在pl/sql中我只要使用utl_file内置程序包读写文件,就会报错:无法处理的用户自定义异常事件
- oracle9i的用户的数据能导入到oracle8.0.3i吗
- 關於遊標
- 菜鸟问题!!
- 菜鸟问题:如何查询一个表的所有者阿??(用SQL语句
- 为什么以ORACLE为后台,使用BDE SQL_LINK连接Oracle使用类似Query->ParamByName("p1")->AsString="aa"来传递SQL语句参数会查询不出结果。
- 很奇怪的一个问题
- 高手请进,复合SQL
select * from table1 a where a.c=(select min(c) from table1 b where a.A=b.A and a.B=b.B);
你的语句有什么错误?
我写了个类似的运行没问题啊
1). c number
select * from table_name a
where a.c=( select min(b.c) from table_name b
where a.A=b.A and a.B=b.B);
2). c varchar
需要对子查询中的数据进行一下转换才能比较
select * from asd where (a,b,c) in (select a,b,min(c) from asd group by a,b)
就好用,第一次是我写错了一个字母,完了之后发帖子时又改了回来,但没有重新试.
麻烦大家了,谢谢!