MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to add auto increment/decrement column in db2 table...

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
sushil
Beginner


Joined: 18 Apr 2005
Posts: 21
Topics: 11

PostPosted: Wed Sep 10, 2008 1:38 am    Post subject: How to add auto increment/decrement column in db2 table... Reply with quote

Hi,

I want to do the following,
Lets the table entries are as follows:

1A 1 x y z ....
1A 2 x y z ....
1A 3 x y z ....
1A 4 x y z ....
1A 5 x y z ....
2A 1 x y z ....
2A 2 x y z ....
3A 1 x y z ....

If I delete row # 3 then is it posible some way (without updating each row separately) to get following result,

1A 1 x y z ....
1A 2 x y z ....
1A 3 x y z ....
1A 4 x y z ....
2A 1 x y z ....
2A 2 x y z ....
3A 1 x y z ....

Thanks for all your help
_________________
"Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that's creativity."
Back to top
View user's profile Send private message
sushil
Beginner


Joined: 18 Apr 2005
Posts: 21
Topics: 11

PostPosted: Wed Sep 10, 2008 1:39 am    Post subject: Reply with quote

Just to add, 1A 2A 3A are all part of key, whereas x,y , z are any values
_________________
"Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that's creativity."
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Sep 10, 2008 5:17 am    Post subject: Reply with quote

use a delete trigger.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group