Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| |||||||||||
Database - Interview Questions and Answers for 'Joins' - 13 question(s) found - Order By Newest | |||||||||||
Frequently asked in Cognizant ( Based on 2 feedback ) | |||||||||||
| |||||||||||
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 Asked in 24 Companies basic   frequent | |||||||||||
Not frequently asked as it was introduced with Java 8. | |||||||||||
| |||||||||||
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("."); | |||||||||||
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 | |||||||||||
| |||||||||||
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 Asked in 26 Companies basic   frequent | |||||||||||
| |||||||||||
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 Asked in 4 Companies basic   frequent | |||||||||||
Rarely asked as it was introduced with Java 8. | |||||||||||
| |||||||||||
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 | |||||||||||
| |||||||||||
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 | |||||||||||
| |||||||||||
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 | |||||||||||
| |||||||||||
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 | |||||||||||
| |||||||||||
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 | |||||||||||
| |||||||||||
Ans. It returns all the rows form the left table and matches the rows in both tables. | |||||||||||
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 Asked in 2 Companies | |||||||||||
| |||||||||||
Ans. Oracle having following types of joins these are also called 8i joins. There are: 1. Equi (or) Inner join 2. Non Equi join 3.Self join 4.Outer join Oracle also support the 9i (or) ANSI standard joins.There are: 1.Inner join 2.Left outer join 3.Right outer join 4.Full outer join 5.Natural join | |||||||||||
Help us improve. Please let us know the company, where you were asked this question : | |||||||||||
Like Discuss Correct / Improve  sql joins  sql Asked in 2 Companies | |||||||||||
| |||||||||||
Ans. Select * from table1 t1Left outer join table2 t2 on t1.tid = t2.id | |||||||||||
Help us improve. Please let us know the company, where you were asked this question : | |||||||||||
Like Discuss Correct / Improve  sql query  database  outer joins Asked in 2 Companies | |||||||||||
| |||||||||||
Ans. 1 , We can do self join | |||||||||||
Help us improve. Please let us know the company, where you were asked this question : | |||||||||||
Like Discuss Correct / Improve  sql join Asked in 1 Companies | |||||||||||
| |||||||||||
| |||||||||||