GeekInterview.com
Series: Subject:
Question: 3 of 234

How to write a loop for multiple select statements from one table ?

Asked by: arigeek | Member Since Apr-2011 | Asked on: Apr 27th, 2011

View all questions by arigeek

Showing Answers 1 - 1 of 1 Answers
sanjay mehra

Answered On : Aug 3rd, 2011

Code
  1.  
  2. SELECT ename, job
  3. FROM emp;
  4. v_cur c1%ROWTYPE;
  5. OPEN c1;
  6. FETCH c1 INTO v_cur;
  7. WHILE c1%found=TRUE
  8. DBMS_OUTPUT.put_line(v_cur.ename||'  '|| v_cur.job);
  9. FETCH c1 INTO v_cur;
  10. CLOSE c1;

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.