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 data dictionary and how can it be created?

622


What is parameterized cursor in oracle?

584


What is the difference between sharding and replication?

489


How to view all columns in an existing table?

554


How to rename a column in an existing table?

622






query optmization techniques and quwry analyser+projects+ppts

1940


How to load a large xml file?

592


Can multiple columns be used in group by in oracle?

553


What is the sql query to concatenate column values from multiple rows in oracle?

569


What is snapshot is too old? Give and example for better understand.

1106


What are the different types of failures that occur in Oracle database?

607


How to update values in a table in oracle?

586


Why does oracle 9i treat an empty string as null?

544


How do I escape a reserved word in oracle?

636


How to insert a record into a table?

648