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
Answer / harsha
One can use Inner Join to get data from two tables.
| Is This Answer Correct ? | 4 Yes | 1 No |
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 |
What are leaf pages?
Is it Possible to declare or create a cursor for UPDATE of table? If yes tell me how? If no Tell me why?
What DB2 Catalog column tell you when an index needs table reorganized ?
Suppose we are doing transaction in a table and abend happened in between. Suppose i have completed the transaction upto X rows and I want to start the transaction again where the abend happened. I don't want to do the transaction from the first record. Then what i have to do.
select * from orders where odate between '2010-01-01'and '2010-03-31' How do u fetch this into cursor?
What is the syntax for FETCH in DB2 ?
What is meant by concurrency?
What is the role of union all and union
Give some example of statistics collected during RUNSTATS?
What's the maximum number of volumes that can be added to a STOGROUP?
Is the primary key a clustered index?
Suppose we have a query for update update table1 set col1 = 'val1' where col2=(select .... from ...) suppose the subquery does not return any record, what will happen to update?