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 All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Format data from multiple records usi... SYNCSORT 4
No new posts count contained values of several col... DB2 5
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts PL/1 SEND CICS MAP first time, attrib... CICS 6
No new posts To Populate Trailer cnt in the file w... SYNCSORT 1
Search our Forums:


Back to Top