I have two tables A and B. Both tables are connected with SSN
number as foreign key. I want to retrieve a column data from B
table. How will you write a query?

Answers were Sorted based on User's Feedback



I have two tables A and B. Both tables are connected with SSN number as foreign key. I want to ret..

Answer / harsha

One can use Inner Join to get data from two tables.

Is This Answer Correct ?    4 Yes 1 No

I have two tables A and B. Both tables are connected with SSN number as foreign key. I want to ret..

Answer / siri

1)select ssn from b;
2)select b1.ssn from a a1,b b1 where a1.ssn=b1.ssn
3)seelct b1.ssn from a a inner join b b1 on a1.ssn=b1.ssn

Is This Answer Correct ?    0 Yes 1 No

I have two tables A and B. Both tables are connected with SSN number as foreign key. I want to ret..

Answer / naidu sekhar yandrapu

SELECT SSN FROM B;

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More DB2 Interview Questions

Can you use a select query in a loop to fetch multiple rows? If so what is the advantage of using a cursor?

2 Answers   L&T, UST,


Describe major components of db2?

0 Answers  


When do you use the IMAGECOPY?

4 Answers  


What statistic will tell the DBA how must space can be reclaimed from dropped table spaces on the next reorg run?

1 Answers  


What is UNION,UNION ALL?

2 Answers  


Name the lockable units in DB2?

0 Answers  


What is cursor stability in db2?

0 Answers  


What is innodb buffer pool?

0 Answers  


Is db2 free?

0 Answers  


What is a synonym ?

2 Answers  


I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?

3 Answers  


What is a DB2 catalog?

2 Answers  


Categories