What is the difference between join and union.

Answer Posted / nitin

for SET operators the resultant column set should be same for the tables.
i.e.
select * from boy
union
select * from girl
will give an error if they have different column
but in join you can corellete the column to each other.

select * from boy,girl where boy.id_gender=girl.id_gender;

will give result

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is stored procedure faster than query?

556


explain the difference between myisam static and myisam dynamic. : Sql dba

511


What is left join example?

494


What sql does db2 use?

537


Explain scalar functions in sql?

575






Explain the significance of the & and && operators in pl sql.

565


Why is %isopen always false for an implicit cursor?

564


What is pl sql block in dbms?

524


How do I audit the sql sent to the server?

519


which types of join is used in sql widely? : Sql dba

535


What is data type in sql?

550


What if we write return in procedure?

785


How to use sql statements in pl/sql?

576


what is a table called, if it has neither cluster nor non-cluster index? What is it used for? : Sql dba

518


What are triggers and its types?

547