User Profile

Collapse

Profile Sidebar

Collapse
gdevelek
gdevelek
Last Activity: Apr 30 '15, 08:27 PM
Joined: Apr 30 '15
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • gdevelek
    replied to Please help with INSERT
    in DB2
    Earlier I had inserted some data where the id column was provided explicitly. When later I attempted to insert data using the autoincrement feature, a conflict occurred when the "next value" was already taken by the initial data.

    Obviously that's a risk one takes when using the BY DEFAULT clause.
    See more | Go to post

    Leave a comment:


  • gdevelek
    replied to Please help with INSERT
    in DB2
    I figured this out, please disregard it and sorry for your time.
    See more | Go to post

    Leave a comment:


  • gdevelek
    started a topic Please help with INSERT
    in DB2

    Please help with INSERT

    Using DB2 LUW v9.7, I have a table where the primary key is an identity column, generated by DEFAULT NO CYCLE . COL1 is the key, COL2, COL3 and COL4 are the remaining columns. An index is created on COL1. No other index exists.

    But I can't insert data into it.

    I write the insert like this, skipping the first column so DB2 will pick the value:

    insert into mytable (col2, col3, col4) values (1,6,'some_text ')"...
    See more | Go to post
No activity results to display
Show More
Working...