Whatz the main diff between Subquery and a Join
Answers were Sorted based on User's Feedback
Answer / a.n.v.v.siva kumar
The main difference between join and sub query is :
join is used to retrieve data from two different tables
where as in sub query we can retreive data from one table
using the result of the where condition on another table.
| Is This Answer Correct ? | 8 Yes | 8 No |
Answer / ramakrishna alla
Above one is exact answer that says sub query is used to get data based on unknown condition (example: select the employee's salary where employee salary greater than clerk) here first we find out clerk salary and then based on his salary we find employee's salary according to above query)
join is used to get the data from atleast 2 tables.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / gomolemo kasale
a sub query is a query nested within another query while
join select rows from multiple table
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / suryakiran
The main usage of subqueries is to retrieve a single record
from that same table or another table.
And also we can use subqueries to retrieve multiple
records,for this we have to use multiple sub queies,instead
of this its better to use joins based on a condition.
We can perform all operations for joins by using subqueries
but it is very complicated.
| Is This Answer Correct ? | 0 Yes | 1 No |
How to get a list of all background sessions in the database?
From the database level, how can you tell under which time zone a database is operating?
Do you know about aggregate functions? What is row num function? Can it be used all databases?
1 Answers Bravura Solutions, Cap Gemini,
How to use "out" parameter properly?
What is Row Chaining ?
I have one table :EID,Depid,ename,sal I want to have max(sal) in each department.
5 Answers Microsoft, Oracle, TCS,
what are steps for interface? where is exchange rate defined in which table?
What is the difference between Sleep and Wait? (Java)
How to resolve name conflicts between variables and columns?
What is background process in Oracle?
How to load data through external tables?
In my table i have 4 columns with 100 records but in that 4 columns one column contains all NULL values so can i add NOT NULL CONSTRAINT on that column......... ok if it is not possible, can i add NOT NULL CONSTRAINT from 101 Record Onwards?