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

In db2 locking system is managed by lockmanager or IRLM


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
venkatarao

New User


Joined: 19 Dec 2004
Posts: 23
Location: hyderabad

PostPosted: Thu Mar 03, 2005 9:48 am
Reply with quote

1.in db2 locking system is managed by lockmanager or irlm
2.list the 2nd maxsalary of employee in emp table by using simple quirry.
3.can we update primary key in a table
Back to top
View user's profile Send private message
lakshmi_546

New User


Joined: 15 Feb 2005
Posts: 5

PostPosted: Thu Mar 03, 2005 10:12 am
Reply with quote

hai
1a.
2a. select dist(sal) from emp.a where n=(select count dist(sal) from emp.b where a.sal<=b.sal)
here n=1,2 3,---------
for ur query n=2
3a.
Back to top
View user's profile Send private message
skkp2006

New User


Joined: 14 Jul 2006
Posts: 93
Location: Chennai,India

PostPosted: Thu Nov 23, 2006 4:30 pm
Reply with quote

The answer to the second question is .....

2. select max(sal) from emp where salary not in(select max(sal) from emp)
3.And i think u can update the primary key of a table and the restriction is only for foreign key when we update it with a value which is not in the primary key list ... sqlcode -530 it seems
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Nov 23, 2006 5:05 pm
Reply with quote

Hi There,

I think we cant update the primary key of DB2 table the only way to delete existing row & insert new row with new value.
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
No new posts JCL Dynamic System Symbols JCL & VSAM 3
No new posts the system or user abend SF0F R=NULL COBOL Programming 0
Search our Forums:

Back to Top