what is the difference between inner and outer join? Explain with example. : Sql dba



what is the difference between inner and outer join? Explain with example. : Sql dba..

Answer / Abhinav Shanker

An INNER JOIN returns records that have matching values in both tables. On the other hand, an OUTER JOIN (LEFT or RIGHT) returns all records from one table and the matched records from the other table. If there is no match, NULL values are used for unmatched columns. Example: n`SELECT a.column1, b.column2 FROM tableA a INNER JOIN tableB b ON a.id = b.id;n`n`SELECT a.column1, ISNULL(b.column2, 'No Match') AS column2 FROM tableA a LEFT JOIN tableB b ON a.id = b.id WHERE b.id IS NULL;'"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What are the types of triggers in sql?

1 Answers  


What is the difference between local and global temporary table?

1 Answers  


What is the difference between syntax error and runtime error?

1 Answers  


How can get second highest salary in sql?

1 Answers  


What does plv msg allows you to do?

1 Answers  


What is online transaction processing (oltp)?

1 Answers  


How to generate a salary slip like jan 1000 1000 feb 1000 2000 ... dec 1000 12000

1 Answers   BT,


How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?

1 Answers  


Can we call dml statement in function?

1 Answers  


What is a trigger ?

11 Answers   Accenture, BirlaSoft,


What are the types pl/sql code blocks?

1 Answers  


can i write pl/sql code in a package

2 Answers  


Categories