We help IT Professionals succeed at work.
Get Started

SQL: Want to update multiple rows in one statement

renisenbb
renisenbb asked
on
124 Views
Last Modified: 2015-04-18
Let's say i have 3 rows:
id    year
--    --------
10    1980
11     1981
12     1992
I want to update these rows so that it is :
10    1970
11     1901
12     1980
So i want to update ids 10,11,12 with the year 1970,1901,1980   RESPECTIVELY.
How would i do this in DB2?
Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE