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

What is the database descriptor?

2 Answers  


What value the host varible will contain , if null indicator value is -2 ? Will it contain the truncated value or nothing will move ?

3 Answers   Cap Gemini,


How to create backup table in db2?

0 Answers  


How many buffer pools are available in db2?

2 Answers  


DB2: A calls B once sucessfull and second time when it calls says curson is open why is it so?

1 Answers   IBM,






When one binds a PACKAGE ( of a plan ) what package information is stored and where it is stored?

3 Answers  


What is a bind card?

0 Answers  


what is SMP/E? and what are the major steps of it? thanks...

1 Answers   IBM,


I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.

0 Answers  


What is a thread?

3 Answers  


What is the self-referencing constraint?

2 Answers  


What does db2 stand for?

0 Answers  


Categories