Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to display the contents of a current record fetched in
a reference cursor?

Answers were Sorted based on User's Feedback



How to display the contents of a current record fetched in a reference cursor?..

Answer / sandeep t

%sqlcount

Is This Answer Correct ?    0 Yes 1 No

How to display the contents of a current record fetched in a reference cursor?..

Answer / karthik

U define a variable in the SQL Prompt as ref cursor Before
that u have to write a procedure with a sys ref cursor as a
inout parameter.Then execute the procedure by passing the
variable defined in the SQL prompt and print the variable It
will display the records.

declare

cursor v_cursor is

select empno empnm empdept from emp where empdept 10;

begin

open v_cursor;

loop

fetch v_cursor into c_empno c_empnm c_empdept;

exit when v_cursor notfound;

dbms_output.put_line(c_empno || ' | ' || c_empnm || ' | ' ||
c_empdept );

end loop;

close v_cursor;

end;

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More SQL PLSQL Interview Questions

What is the Query to print out the individual total number of duplicate row in sql.

5 Answers   TCS,


What is lexical units in pl sql?

0 Answers  


what is a composite key ? : Sql dba

0 Answers  


What is cte sql?

0 Answers  


What is the benefit of foreign key?

0 Answers  


Is left join inner or outer?

0 Answers  


What is a native sql query?

0 Answers  


HP Interview -2016 Unix 1) grep command in unix 2) what is set command

1 Answers   HCL,


How to revise and re-run the last sql command?

0 Answers  


I have one table,in that table (1)i have java1.1 version books are 2 and java1.5 version books are 4. (2).Net2.0 books are 3, .Net3.5 books are 2 (3)ABC1.6 books are 4, ABC2.0 books are 3. Now i want output is like Book Count Java 6 .Net 5 ABC 7 For this i need sql query, please help me if anyone how to get this result. Thanks, Seenu

4 Answers   Adea,


What is a stored procedure in sql with example?

0 Answers  


What is the difference between stored procedure and view?

0 Answers  


Categories