Difference between join and a subquery?

Answer Posted / ashi

Sub query: The sub query has more than one select
statement,the inner query which executes first and then it
will be the value of the 2nd query.
EX:
select ename from emp where sal>(select avg(sal) from emp);

Joins:
When the data from more than one table in the database,then
a join condition used.Rows in the one table can be joined to
rows in the other table according ro the common values
existing in corresponding columns
EX:
select dname,ename from emp,dept where emp.deptid=dept.deptid;

Is This Answer Correct ?    9 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a tns file?

500


What is background process in Oracle?

624


what is dynamic SGA and static SGA

3830


Explain the characteristics of oracle dba?

636


How to list all user accounts in oracle?

608






What is the disadvantage of User defind function?

1833


Explain temporal data types in oracle

603


Write a syntax for update query in oracle?

614


How to recover a dropped table in oracle?

603


What is the difference between translate and replace in oracle?

648


Which environment variables are absolutely critical in order to run the OUI?

1646


What is a sub query? What are its various types?

582


How a database is related to tablespaces?

576


how can we store any pdf file in oracle

1636


Explain what are the advantages of views?

605