tab1 tab2
1,a 1,d
2,b 3,c
perfoms outerjoin what is the o/p?
write sql query for outerjoin?

Answers were Sorted based on User's Feedback



tab1 tab2 1,a 1,d 2,b 3,c perfoms outerjoin what is the o/p? write sql query for oute..

Answer / subhash

OUTPUT:
1, a, d
2, b, NULL
3, NULL, c

SQL Query:
SELECT * FROM TAB1 FULL OUTER JOIN TAB2 ON
TAB1.key_column=TAB2.key_column;

or

SELECT * FROM TAB1,TAB2 WHERE
TAB1.key_column=TAB2.key_column(+)
UNION
SELECT * FROM TAB1,TAB2 WHERE
TAB1.key_column(+)=TAB2.key_column;

Is This Answer Correct ?    7 Yes 0 No

tab1 tab2 1,a 1,d 2,b 3,c perfoms outerjoin what is the o/p? write sql query for oute..

Answer / subhash

OUTPUT:

1, a, d
2, b, NULL
3, NULL, c

Is This Answer Correct ?    3 Yes 0 No

tab1 tab2 1,a 1,d 2,b 3,c perfoms outerjoin what is the o/p? write sql query for oute..

Answer / karthi

select * from tab1 full outer join tab2 on
tab1.key_column=tab2.key_column;

or

select * from tab1,tab2 where tab1.key_column(+)=tab2.key_column
union
select * from tab1,tab2 where
tab1.key_column=tab2.key_column(+);

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More Data Stage Interview Questions

Hi Can any one help regarding below INPUT NAME LOC Ram hyd Ram ban Raj chn Raj Pun Sam del OUPUT NAME LOC Ram Hyd ban Raj chn pun sam del

3 Answers   HCL,


how to find no.of records in sequntial file itself?

4 Answers  


i have source data like empno,enmae 11 ,aa 12 ,bb i want output like empno,ename 11 ,aa 12 ,bb 11 ,aa 12 ,bb

7 Answers   TCS,


hi.... am facing typical problem in every interview " I need some critical scenarios faced in real time" plz help me guys

0 Answers  


How complex jobs are implemented in datstage to improve performance?

0 Answers  






for example You have One Table with 4 Columns (Mgr ID, Department ID, Salary, Employee ID). Can you find out the Average Salary and Number of Employee present per Department and Mgr

0 Answers  


How can we perform 2nd time extraction of client database without accepting the data which is already loaded in first time extraction?

1 Answers   Infosys, TCS,


which is the most complex job in your career? Please tell me answer?

2 Answers   IBM, Wipro,


What is the diff between sort performed at sort stage and the stream sort performed at the input of few stages in DS Enterprise edition?

1 Answers  


What is the Difference Between DataStage 7.5 version and 8.1 Version?

10 Answers   IBM,


how will u design file watch jobs?

2 Answers  


What steps should be taken to improve Datastage jobs?

0 Answers  


Categories