Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002
    Posts
    227

    Unanswered: insert with update......

    Hi,
    I've this table:

    desc TAB1
    DESCRIPTION VARCHAR2(20);
    QUANTITY NUMBER;


    DESCRIPTION........QUANTITY
    APPLE............. 10
    COFFEE............ 7

    I'd like to insert into TAB1 a new record, but if the value of description exist, It update quantity without
    insert a new record.
    Is it possible do it with just one statement sql without any control structure??

    thanks
    Raf

  2. #2
    Join Date
    Nov 2002
    Posts
    833
    with 9i there comes a merge statement which gives you "upsert" functionality

  3. #3
    Join Date
    Jul 2002
    Posts
    227
    my oracle version is 8.1.7.0

    Is it possible with this version??


    Thanks

Posting Permissions

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