store procedure to insert multiple records at a time into table?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sachingarje26
    New Member
    • Mar 2018
    • 1

    store procedure to insert multiple records at a time into table?

    i am new to db2 database , want to create a stored procedure for How to Insert entire DataTable into DB2 at once instead of row by row? please help me out with this.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Is the data you want to insert into the Data Table already in another Data Table (or tables)?

    You can use the Select statement with the Insert statement like this:
    Code:
    Insert Into Table1(ColID, ColNumber, ColDate)
    Select tbl2ID, tbl2NO, tbl2Date FROM Table2

    Comment

    Working...