-
Hi,
Is anybody knows can we compare 2 varrays?
Like that: varray1 = varray2 ?
Thanks
-
Don't think so!
Look at the following:
declare
--CREATE OR REPLACE TYPE phone_numbers AS VARRAY(10) OF varchar2(16)
--above line for definition of VARRAY only
p1 phone_numbers := phone_numbers();
p2 phone_numbers := phone_numbers();
begin
p1.extend;
p1(1) := '925-6860942';
p2.extend;
p2(1) := '415-6104835';
p2.extend;
p2(2) := '925-6860942';
if p1(1) = p2(1) then
-- individual elements can be compared
dbms_output.put_line('equal');
else
dbms_output.put_line('not equal');
end if;
if p1 = p2 then
-- will not even compile
end if;
exception
when others then
dbms_output.put_line(sqlerrm);
end;
-amar
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|