2,668
社区成员
发帖
与我相关
我的任务
分享
declare
cursor cursor_r is select * from a;
begin
for cur in cursor_r loop
if cur.sex='男' then
dbms_output.put_line('姓名:'||cur.name||' 地址:'||cur.address);
else
dbms_output.put_line('姓名:'||cur.name||' 电话:'||cur.phone);
end if;
end loop;
end;
select a1.name,c.deptname,a2.name,a2.phone from a a1,a a2,b,c where
(b.产品负责人编号=a1.员工编号 and b.deptno=c.deptno and c.部门负责人=a2.员工编号
and b.product='《计量支付》');
select name,address from a where deptno in (select deptno from c where deptname='IPMS');