Results 1 to 5 of 5

Thread: update

  1. #1
    Join Date
    Jul 2012
    Posts
    9

    Wink Unanswered: update

    Hi ppl,
    I have one doubt
    how to update multiple records at a time

    ex:

    update emp
    set sal=sal+sal*.08,
    set deptno=30,
    set job='SALESMAN'
    where ename='FORD';

    make it correct plzzz( I want to update table with single stmt)?????

  2. #2
    Join Date
    Mar 2007
    Posts
    623
    Hi,
    I have also one doubt: why did you not simply look into Oracle documentation for correct syntax of UPDATE statement?
    SQL statements are fully described in SQL Language Reference book, which is available with other Oracle documentation e.g. online on http://tahiti.oracle.com/
    For 11gR2, it is placed here: http://docs.oracle.com/cd/E11882_01/...8.htm#i2067715
    Second example shows what you want (change values of multiple columns).
    Next time, please, search yourself!

  3. #3
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Huh, you are talking two different things here. The question is: "how to update multiple records at a time", but you are trying to update multiple columns. So what do you really plan to do?

  4. #4
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    update emp
    set sal=sal+sal*.08,
    deptno=30,
    job='SALESMAN'
    where ename='FORD';
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  5. #5
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by NARESHSHREERAM View Post
    Hi ppl
    Who is ppl? Parts Per Liter?

    make it correct plzzz
    What is a plzzz?
    In Germany the zip code is abbreviated with PLZ, is that what you mean? How to detect a correct german zip code?
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags: http://www.dbforums.com/misc.php?do=bbcode#code

    Tips for good questions:

    http://tkyte.blogspot.de/2005/06/how...questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html

Posting Permissions

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