how to insert values into a table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cuqsy0
    New Member
    • Apr 2012
    • 22

    how to insert values into a table

    Hello Experts,

    I have a question on PL SQL. Assuming I have the following table

    TestTable (ID, Table_Name, Column_Name)

    It is in the form like
    Code:
    ID, Table_Name, Column_Name
    -----------------------------------
    1     TableA      ColA1
    1     TableA      ColA2
    1     TableA      ColA3
    2     TableB      ColB1
    2     TableB      ColB2
    3     TableC      ColC1
    3     TableC      ColC2
    3     TableC      ColC3
    3     TableC      ColC4
    .
    .
    .
    ------------------------------------
    The columns "Table_Name " and "Column_Nam e" have been inserted into the table, while ID is NULL before we insert the corresponding values. I wish to know a code to generate the ID and how to insert the ID into TestTable with PL SQL.

    Thanks for any help.

    Cuq
    Last edited by Frinavale; May 30 '12, 01:28 PM. Reason: Added code tags to format the table.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Why would you need the ID field? It adds no additional information to what you already have.

    Comment

    Working...