Unanswered: code for inserting data into that table dynamically
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.
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?
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.