Database - Interview Questions and Answers for 'Joins' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com
Share

Search Interview Questions


 2807 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Database - Interview Questions and Answers for 'Joins' - 13 question(s) found - Order By Newest

Frequently asked in Cognizant ( Based on 2 feedback )
  Q1. What are Inner , Outer , Left and Right Joins in SQL ?Database2017-01-09 13:07:55

Ans. Inner join is the intersection of two tables on the condition defined by the where clause i.e will get records from both tables matched by a column.

Outer join is the union of two tables i.e will get all records from both tables and will put null in the columns where related records are not present.

Left Outer join is the left union of two tables i.e all records from the table on the left and values from the right table for related records else null for the columns from right table.

Right Outer join is the right union of two tables i.e all records from the table on the right and values from the left table for related records else null for the columns from left table.

 Help us improve. Please let us know the company, where you were asked this question :   


   Like      Discuss      Correct / Improve     sql  inner join  outer join  right join  left join     EPAM  Antra  MSCI  HCL Technologies  Cognizant (CTS)  Morgan Stanley  Wipro  Infosys  Accenture  IBM  PayPal  A9.com  Curriculum Associates  Gold Coast IT  Kobie Marketing  Hybris  Aptroid Technologies  E2open  IGATE  SnapDeal  Verilogue  Span Infotech      basic        frequent


Not frequently asked as it was introduced with Java 8.
 Q2. What is StringJoiner ?Core Java
Admin
info@buggybread.com
Ans. StringJoiner is a util method to construct a string with desired delimiter. This has been introduced with wef from Java 8.

Sample Code

StringJoiner strJoiner = new StringJoiner(".");
strJoiner.add("Buggy").add("Bread");
System.out.println(strJoiner); // prints Buggy.Bread


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   java8   java 8   string   stringjoiner


  Q3. What is a self Join and give an example of a self Join ?

or

What is self Join and What is it's purpose ?
Database2016-06-30 20:13:35

Ans. When a Table Join itself , it's a Self Join. For example - we like to know the pair of department names where first dept has lesser employees than the later.

Select D1.name , D2.name from Dept D1, Dept D2 where D1.employee_count < D2.employee_count

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     sql  joins  self join  self-join  Pair of employee names with first having lesser salary than later  Pair of department names where first dept has lesser employees than the later     Accenture  West Monroe Partners  Oracle  eBay  Impetus Technologies  Bank of America  Fannie Mae  Wize Commerce  Kleward Consulting  Pyramid Consulting  Interra Information Technologies  Trigent Software  Xtreme Media  IGATE  Nagarro  Six Sigma  Nityo Infotech  Fujitsu  BlazeClan  Twist Bioscience  Invoyent  Cognizant (CTS)  i2c  Capgemini   Blazeclan      basic        frequent


 Q4. Difference between Inner and Outer Join ?Database
Admin
info@buggybread.com
Ans. Inner join is the intersection of two tables on a particular columns whereas Outer Join is the Union of two tables.



 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     sql   joins   inner join   outer join     Hewlett Packard (HP)      basic        frequent


Rarely asked as it was introduced with Java 8.
 Q5. Which of the following has been introduced with Java 8 ? a. StringBuffer b. StringBuilder c. StringFilter d. StringJoinerCore Java
Anonymous
Ans. StringJoiner

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   java8   java 8   string   stringjoiner


 Q6. If Table A has 100 records and Table B has 50 records , how many records will the equi join of Table generate ?SQL2017-07-14 17:59:56

Ans. It depends on the join condition.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     equi join  sql join  database  sql


 Q7. If Table A has 100 records and Table B has 50 records , how many records will the left join of Table A with Table B generate ?SQL2017-07-14 18:00:37

Ans. 100 records

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     database  sql  sql joins   left join


 Q8. If Table A has 100 records and Table B has 50 records , how many records will the right join of Table A with Table B generate ?SQL2017-07-14 18:01:01

Ans. 50 records

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     database  sql  sql joins   right join


 Q9. If Table A has 0 records and Table B has 50 records , how many records will the equi join of Table generate ?SQL2017-07-14 18:01:50

Ans. 0 records

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     database  sql  sql joins   equi join



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



 Q10. What is Left Outer Join ?Database2018-01-05 15:25:44

 This question was recently asked at 'NIIT Tech'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     database   database joins   left outer join  sql     NIIT Tech


 Q11. Describe SQL JoinsDatabase2018-02-08 00:11:24

 This question was recently asked at 'Mindtree'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     sql joins  sql     Mindtree


 Q12. In majority of the cases, the following join will give maximum number of results ?Database
a. Inner Join
b. Outer Join
c. Left Join
d. Right Join

Ans.b. Outer Join

 Q13. Which if the following is true for SQL Joins ?Database
a. Left Join and Right Join gives equal number of Results
b. Outer Join and Inner Join gives equal number of Results
c. Inner Join gives maximum number of results records
d. Inner Join gives minimum number of result records

Ans.d. Inner Join gives minimum number of result records



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked:
         

X Close this

X Close this

Help Us Improve.
Please share your
interview experience.

Company Name:   


Questions Asked: