可以多个啊,只要定义OUT类型的参数就可以了
解决方案 »
- 求帮助写一个外连接SQL!!!!!!!!外连接,或者子查询~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 关于函数to_chart的问题
- 游标的问题
- 两个表每个表有两个字段如何合并到一个表中 有对应关系
- windows下如何使用API建立oracle用户
- 欲建立VIEW,但系统提示权限不足?为何?在线等!
- oracle10g的console服务启动不了。
- blob视图关联问题!!!!!
- 关于在存储过程中判断是否存在该条纪录以确定是否写或是更新这条纪录失败的问题。
- VC中怎样调用SVRMGRL指令,比如CONNECT INTERNAL/ORACLE ,请给出代码
- 建表问题?
- 该怎样写这样的SQL语句
create or replace procedure pro_test
(
p_id in number,
p_name out varchar2,
p_name1 out varchar2
) as begin
select t.name into p_name from tablename t where t.id=p_id;
select 'name' into p_name1 from dual;
.....
end ;
IS
out_rec TickerType := TickerType(NULL,NULL,NULL);
in_rec tableName%ROWTYPE;
Cursor p is Select * From tablename Where seal_no=seal_no;
BEGIN
LOOP
-- Function accepts multiple rows through a REF CURSOR argument.
FETCH p INTO in_rec;
EXIT WHEN p%NOTFOUND;
-- Return value is a record type that matches the table definition.
out_rec.seal_no := in_rec.seal_no;
out_rec.seal_Type := in_rec.seal_type;
out_rec.seal := in_rec.seal;
-- Once a result row is ready, we send it back to the calling program,
-- and continue processing.
PIPE ROW(out_rec);
END LOOP;
CLOSE p;
-- The function ends with a RETURN statement that does not specify any value.
RETURN;
END;
/SELECT * FROM TABLE(StockPivot('1'));
/
create or replace function testrerecordnotabname (tableid in number)
return mytabletype
as
l_data mytabletype :=mytabletype();
begin
for i in (select * from a where id>=tableid) loop
l_data.extend;
l_data(l_data.count) := myobjectype(i.id,i.doctime,i.name);
end loop;
return l_data;
end;
/
--调用:
select * from table(testrerecordnotabname(1));
FROM CUSTOMS_EXPORT_FORM_TAB a,CUSTOMS_SEAL_TAB b
WHERE a.seal_no=b.seal_no
AND a.seal_no=seal_no_;謝謝了,幫幫我這樣菜的菜鳥!!!!
/
create or replace function testrerecordnotabname (seal_no_ in number)
return mytabletype
as
l_data mytabletype :=mytabletype();
begin
for i in (SELECT a.export_form_no FROM CUSTOMS_EXPORT_FORM_TAB a,CUSTOMS_SEAL_TAB b
WHERE a.seal_no=b.seal_no AND a.seal_no=seal_no_) loop
l_data.extend;
l_data(l_data.count) := myobjectype(i.export_form_no);
end loop;
return l_data;
end;
/
--调用:
select * from table(testrerecordnotabname(输入某个seal_no_的值));