10
我試圖在數組保存集ID:如何在Oracle PL/SQL中選擇INTO數組數組?
declare
cities_ids array_of_numbers;
begin
select id into cities_ids from objects where id = 1115464;
FOR i IN 1..cities_ids.COUNT LOOP
DBMS_OUTPUT.PUT_LINE(cities_ids(i));
END LOOP;
end;
執行後,我得到了一個錯誤:
ORA-00932: inconsistent datatypes. Expected UDT, got NUMBER.
請解釋一下我做錯了什麼......
看[這裏](http://www.experts-exchange.com/Database/Oracle/Q_26235824.html)也許這會幫助你。 – Jens