Results 1 to 4 of 4
  1. #1
    Join Date
    May 2011
    Posts
    3

    Question Unanswered: code for inserting data into that table dynamically

    Sir/Mam,

    I have a following requirement:

    I have created a table like this:

    CREATE TABLE (NAME VARCHAR2(30) ,ROLL NUMBER);

    Now i need a code for inserting data into that table dynamically.I mean when i run that code it will ask me the value to be entered.And after entering the values it will insert that value into database tables.It may ask for unlimited value.

  2. #2
    Join Date
    Mar 2007
    Posts
    623
    It depends, which tool you want to use for "asking the value to be entered". As SQL and PL/SQL are not interactive languages, you have to choose different one, e.g. SQL*Plus, Java, C, PHP, Visual Basic. There are many other ones and, as they differ, the exact implementation will depend on this choice.
    I am also not sure what you mean with "unlimited value". NULL? Infinity? Something else? Could you precise it?

  3. #3
    Join Date
    May 2011
    Posts
    3

    Question code for inserting data into that table dynamically

    Hi ,

    Thanks for ur respond.
    I am using SQL*Plus ."unlimited value" refers to I can continue to insert number of rows i wish.


    Thanks,
    Priya

  4. #4
    Join Date
    Mar 2007
    Posts
    623
    Quote Originally Posted by priya2184 View Post
    I am using SQL*Plus ."unlimited value" refers to I can continue to insert number of rows i wish.
    As SQL*Plus does not contain any variant of loop statement, you cannot do it directly there.
    You may write a shell/batch script (depending on the operating system), which calls SQL*Plus for (at least) inserting values into tables.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •