1 SELECT a.field1, b.field2, c.field3, d.field4
2 FROM atable a, atable b, ctable c, dtable d
3 ?
4 ORDER BY 1

What is the minimum number of joins that must be specified
on line 3 in the sample code above to properly link the
tables? Notice that the table "atable" is aliased twice:
once as "a" and once as "b."

1. One join
2. Two joins
3. Three joins
4. Four joins
5. Five joins




Answers were Sorted based on User's Feedback



1 SELECT a.field1, b.field2, c.field3, d.field4 2 FROM atable a, atable b, ctable c, dtable d 3 ? ..

Answer / rao

generally if n tables will n-1 joins
here 4 tables 3joins

Is This Answer Correct ?    8 Yes 1 No

1 SELECT a.field1, b.field2, c.field3, d.field4 2 FROM atable a, atable b, ctable c, dtable d 3 ? ..

Answer / sss

We need minimum of n-1 joins to join n tables.
here 3 tables are there.
so we need minimum of 2 joins to join the 3 tables

Is This Answer Correct ?    3 Yes 1 No

1 SELECT a.field1, b.field2, c.field3, d.field4 2 FROM atable a, atable b, ctable c, dtable d 3 ? ..

Answer / arata kumar pattanaik

1 SELECT a.field1, b.field2, c.field3, d.field4 2 FROM
atable a, atable b, ctable c, dtable d 3 ? 4 ORDER BY 1
What is the minimum number of joins that must be specified
on line 3 in the sample code above to properly link the
tables? Notice that the table "atable" is aliased twice:
once as "a" and once as "b." 1. One join 2. Two joins 3.
Three joins 4. Four joins 5. Five joins
Answer
generally if n tables will n-1 joins
here 4 tables 3joins

Is This Answer Correct ?    2 Yes 0 No




1 SELECT a.field1, b.field2, c.field3, d.field4 2 FROM atable a, atable b, ctable c, dtable d 3 ? ..

Answer / mohan

There should be Three joins in where clause. no point of that the table "atable" is aliased twice. It will treat as two separate tables....

Is This Answer Correct ?    2 Yes 0 No

1 SELECT a.field1, b.field2, c.field3, d.field4 2 FROM atable a, atable b, ctable c, dtable d 3 ? ..

Answer / rao

generally if n tables will n-1 joins
here 4 tables 3joins

Is This Answer Correct ?    3 Yes 2 No

1 SELECT a.field1, b.field2, c.field3, d.field4 2 FROM atable a, atable b, ctable c, dtable d 3 ? ..

Answer / satya

HERE WE HAVE TOTAL NO. OF TABLE IS 3 SO NO. OF JOIN REQUIRE
IS 2







Thanks
satya
+919916174212

Is This Answer Correct ?    2 Yes 2 No

Post New Answer



More SQL PLSQL Interview Questions

write a query filter the null value data following source? name age john 30 smith null null 24 sharp 35 i want output name age john 30 sharp 35

1 Answers   TCS,


Hi All, I am new to both this blog and technology. I was able to see a response for one of the questions on triggers as below. I would like to know why are we using " if rtrim(to_char(sysdate,'day'))=rtrim('sunday') then" instead, can't we use " if sysdate = 'sunday' then". I can understand the use of "rtrim", but dont know y v r using to_char. I have seen this in many cases but did not get a convincible explaination. Please help me with this and do excuse if this question sounds silly. Thanks in advance...... create or replace trigger trg_sun before insert on <table name> begin if rtrim(to_char(sysdate,'day'))=rtrim('sunday') then raise_application_error(-20345,'no transaction in sunday'); end if; end trg_sun;

2 Answers  


what is variable in package specification

2 Answers  


how to get enames with comma seperated values by deptwise on emp table?

8 Answers  


i have a table t1 a math 20 b phy 30 cchemisty 10 a math 40 b phy 23 c che 21 a math15 bphy 33 c che 56 write a quire to find out the max markr of each subject

8 Answers  






what is overloading procedure or overloading function ?

3 Answers   Genpact,


1. what is the exact use of hint in sql. 2. How we can avoid index scan in sql even though index is there in the table.

1 Answers   Polaris,


What is Data Concarency and Consistency?

1 Answers  


What are different types of joins ?

5 Answers   BirlaSoft,


Which is the best place to learn hadoop?

1 Answers  


7. Where would you look for errors from the database design?

1 Answers   Fintellix,


In a package if we have 10 procedures or functions,How to know which will execute first?

1 Answers   Sollet Soft,






Categories