Results 1 to 2 of 2

Thread: Iteration in PL/SQL

  1. #1
    Contributing Member
    Join Date
    May 2008
    Answers
    39

    Iteration in PL/SQL

    Hi,

    I need to change this following code into Pl/sql.. can any one help me out?

    for(m=1;m<=n-2;m++)


    Regards,
    Karthi.....


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Iteration in PL/SQL

    the following a sample program for a FOR loop.

    modify as per your rerquirment.

    BEGIN
    FOR I IN 1..100 LOOP
    --if the number is divisible by 2 then it is a even number.
    IF MOD(I,2)=0 THEN
    --display the number.
    dbms_output.put_line(I);
    END IF;
    END LOOP;
    END;


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact