2.
select name,type,count(job)
from table
group by name,type;
select name,type,count(job)
from table
group by name,type;
解决方案 »
- Access数据库中Update问题
- 求帮忙,关于SQL文方面的。
- 为什么oracle这样就会报列过长?但这个列名存在的,见表的时候没有报过长,查的时候报?郁闷,如何处理
- 分数不多,在于知识 about create sequence !!!
- 帮忙,oracle10g的数据如何恢复??
- imp和exp的疑问
- 8i的客户端能访问9i的数据库吗?
- 在oracle中如何存放图片,如:jpg,bmp等类型?
- oracle8.17的客户端能不能访问oracle8.0服务端
- 请问:如何开始一个事务?
- 能不能通过设置 Oracle,使得sql语句中不用 to_date 进行日期转换就可以执行?
- 请问,提取存储过程代码的SQL语句是什么。
break on name ;
v_job varchar2(30);
cursro c_job is select * from tablename where name = v_name and type = v_type;
begin
for i in c_job loop
v_job := v_job || ' ' || i.job;
end loop;
return v_job;
exception
when others then
return null;
end;2、
group by naem ,type
通过sum(decode(..)) group by ....变通实现。
查阅相关帖子。有很详细的描述。