View previous topic :: View next topic
|
Author |
Message |
venkatarao
New User
Joined: 19 Dec 2004 Posts: 23 Location: hyderabad
|
|
|
|
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 |
|
|
lakshmi_546
New User
Joined: 15 Feb 2005 Posts: 5
|
|
|
|
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 |
|
|
skkp2006
New User
Joined: 14 Jul 2006 Posts: 93 Location: Chennai,India
|
|
|
|
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 |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
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 |
|
|
|