- 论坛徽章:
- 0
|
--建表
create table orders (
id integer primary key,
name varchar(10),
amount integer
)
--插入数据
inser into orders values(1,'aa',10);
inser into orders values(2,'aa',10);
inser into orders values(3,'aa',10);
--批量绑定
declare
type ordersTableType is table of orders%rowtype;
ordersTable ordersTableType;
begin
select * bulk collect into ordersTable from orders;
DBMS_OUT.put_line(ordersTable.count);
end;
--错误信息
ERROR 位于第 5 行:
ORA-06550: 第 5 行, 第 30 列:
PLS-00597: INTO 列表中的表达式 'ORDERSTABLE' 类型错误
ORA-06550: 第 5 行, 第 42 列:
PL/SQL: ORA-00904: 无效列名
ORA-06550: 第 5 行, 第 3 列:
PL/SQL: SQL Statement ignored
ORACLE版本:
Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production
PL/SQL Release 9.0.1.1.1 - Production
CORE 9.0.1.1.1 Production
TNS for 32-bit Windows: Version 9.0.1.1.0 - Production
NLSRTL Version 9.0.1.1.1 - Production
各位帮我看看怎么会事
谢谢 |
|