IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Update multiple rows in a table at a time


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
program developer

New User


Joined: 15 Nov 2005
Posts: 3

PostPosted: Tue Nov 15, 2005 1:09 pm
Reply with quote

Hi,
I have the Table structure as :
emp table
eid ename
100 abc
200 def
101 cba

is it possible to update the "ename" column in single update query?
like say for Eid =100 "abc" i want to update as "cba" and
for Eid= 101 "cba" as "abc" in a single update.
How can i do that?


Thank you in advance.
Back to top
View user's profile Send private message
mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 237
Location: USA

PostPosted: Wed Nov 16, 2005 6:41 pm
Reply with quote

program developer,

what is the key of the table??
Back to top
View user's profile Send private message
program developer

New User


Joined: 15 Nov 2005
Posts: 3

PostPosted: Fri Nov 18, 2005 6:34 pm
Reply with quote

Eid is the key.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Load new table with Old unload - DB2 DB2 6
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top