Question:

Create temporary table say "insert1000records" which has column names "Count","Remarks".?

by  |  earlier

0 LIKES UnLike

how do i write a PL/SQL code to insert 1000 records in the above defined table. The records should be

stored in below format.

Count Remarks

-------- -----------

1 This is "1" Record

2 This is "2" Record

....and so on till 1000 record.

 Tags:

   Report

2 ANSWERS


  1. Just a suggestion - column names should NEVER be keywords! This might get you somewhere in the ballpark:

    loop_counter NUMBER(4);

    CREATE TABLE insert1000records (rec_count NUM(4), remarks CHAR(30));

    for loop_counter in 1...1000 LOOP

    INSERT INTO insert1000records VALUES (loop_counter, 'This is "' || loop_counter || '" Record');

    END LOOP;


  2. ASP.NET Interview Question And Answers-http://aspdotnetanswers.blogspot.com/

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions