View previous topic :: View next topic
|
Author |
Message |
Amit tandon Warnings : 1 New User
Joined: 29 Jul 2010 Posts: 6 Location: mumbai
|
|
|
|
Hi all,
I have 2 tables. table A have emp no,emp name and table B have empno,name,salary.
I want to emp name and salary who's emp no is 107. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
First - a topic called DB2 in a forum section called DB2 is not at all helpful or meaningful.
Second - what problem are you having with your SELECT statement? This looks to me to basic SQL. The DB2 User's Guide should help you here an any basic text on using SQL. |
|
Back to top |
|
|
Amit tandon Warnings : 1 New User
Joined: 29 Jul 2010 Posts: 6 Location: mumbai
|
|
|
|
Thanks,
Actually i m using join for that. so want to say i have to use nested select statement. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Amit tandon wrote: |
Actually i m using join for that. so want to say i have to use nested select statement. |
Why don't you share, what you have tried, with us? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Since table B has emp_no, emp_name and salary why do you need to include table A? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Good one Craig, I did not notice that! |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Finding the empno's in table A not in table B hence not getting any salary? |
|
Back to top |
|
|
|