Home » Other » Training & Certification » PL/SQL Table (merged)
PL/SQL Table (merged) [message #280342] Tue, 13 November 2007 04:59 Go to next message
ramya29p
Messages: 100
Registered: November 2007
Location: Chennai
Senior Member
Hi can anyone explain about index by table & its use......?
In the following code i would like to print all the column values of the table emp using index by table without using bulk collect method..pls suggest me...

declare
type emp_ty is table of emp%rowtype index by binary_integer;
var1 emp_ty;
cursor cur1 is select * from emp;
begin
open cur1;
loop
fetch cur1 bulk collect into var1;
exit when cur1%notfound;
end loop;
for i in var1.first..var1.last loop
dbms_output.put_line(var1(i).emp_name);
end loop;
end;
Re: Index by table [message #280346 is a reply to message #280342] Tue, 13 November 2007 05:09 Go to previous messageGo to next message
dhananjay
Messages: 635
Registered: March 2002
Location: Mumbai
Senior Member
may be you should check this link.

http://www.sqlsnippets.com/en/topic-12302.html

regards,

[Updated on: Tue, 13 November 2007 05:09]

Report message to a moderator

PL/SQL Table [message #280557 is a reply to message #280342] Wed, 14 November 2007 01:32 Go to previous messageGo to next message
ramya29p
Messages: 100
Registered: November 2007
Location: Chennai
Senior Member
Can anyone explain about Index by table ........?
Re: PL/SQL Table [message #280559 is a reply to message #280557] Wed, 14 November 2007 01:34 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Those nice people who wrote the Oracle Documentation can do it.
Re: PL/SQL Table [message #280563 is a reply to message #280559] Wed, 14 November 2007 01:46 Go to previous messageGo to next message
dhananjay
Messages: 635
Registered: March 2002
Location: Mumbai
Senior Member
i don't think the OP is interested in reading the docs.bcoz he had asked the same question yesterday.

http://www.orafaq.com/forum/?t=rview&goto=280342#msg_280342


regards,
Re: PL/SQL Table [message #280565 is a reply to message #280563] Wed, 14 November 2007 01:51 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Well, hopefully they'll get the hint before Michel finds them Cool
Previous Topic: Certifications in Oracle JDeveloper
Next Topic: what is difference between stored procedure and plsql
Goto Forum:
  


Current Time: Fri Dec 02 12:44:37 CST 2016

Total time taken to generate the page: 0.04926 seconds