1,单行单列
用变量即可存储
2,单行多列
record (见总结一) 格式: type name is record (fieldname type...);
3,多行单列
集合(变量)
4,多行多列
集合(record)
==========================华丽分割线===========================
集合 :(type name is table of typedefine index by binary_integer)
1 多行单列
declare
type array_empname is table of emp.ename%type index by binary_integer;
a array_empname;
begin
select ename bulk collect into a from emp;
for i in a.first .. a.last loop
dbms_output.put_line(a(i));
end loop;
end;
2 多行多列
用变量即可存储
2,单行多列
record (见总结一) 格式: type name is record (fieldname type...);
3,多行单列
集合(变量)
4,多行多列
集合(record)
==========================华丽分割线===========================
集合 :(type name is table of typedefine index by binary_integer)
1 多行单列
declare
type array_empname is table of emp.ename%type index by binary_integer;
a array_empname;
begin
select ename bulk collect into a from emp;
for i in a.first .. a.last loop
dbms_output.put_line(a(i));
end loop;
end;
2 多行多列