Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What are the differences between UNION and JOINS?

Answers were Sorted based on User's Feedback



What are the differences between UNION and JOINS?..

Answer / saravakumar

A join selects columns from 2 or more tables. A union
selects rows.

Is This Answer Correct ?    7 Yes 0 No

What are the differences between UNION and JOINS?..

Answer / sree

UNION:The SQL UNION operator combines two or more SELECT
statements.

JOINS:SQL joins are used to query data from two or more
tables, based on a relationship between certain columns in
these tables.

Is This Answer Correct ?    4 Yes 0 No

What are the differences between UNION and JOINS?..

Answer / nikhila reddy

UNION:the both tables should have same structure and datatype.
the column name will taken as first table ones it wont bother abt other tables.
example:
emp table as
eid ename esal
1 a 10k
2 b 20k

dept table as
deptid deptname deptsal
11 aa 20k
12 bb 50k


select * from emp
union
select * from dept

empid empname empsal
1 a 10k
2 b 20k
11 aa 20k
12 bb 50k

now u can observe col name taking alias of first table.
no need of relation between a tables.
it will remove duplicate records.


joins:it will join only required fields from different tables.
no need of same structure for tables..
it should have relation between a tables.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is the difference between views and stored procedures? Can we have input parameters for views?

6 Answers  


i have account table which consists of account name,card no and card no consists 16 digits now i want to retrieve the data if card no starts from 4 then it should print visa and if it starts from 5 then it should print master so plse help me to write simple query with out store procs .

3 Answers  


What are the steps to process a single select statement?

0 Answers  


How will u find the query which is running in some other machine

4 Answers   CarrizalSoft Technologies, IBM,


how can you attach more than 20 ldf files in sql server

0 Answers   IBM,


Explian different types of BACKUPs avaialabe in SQL Server? Given a particular scenario, how would you go about choosing a backup plan?

2 Answers   HCL,


What are the different types of Indexes available in SQL Server?

0 Answers  


what are the steps you will take to improve performance of a poor performing query? : Sql server database administration

0 Answers  


write a query for list of owner who are having multiple bikes in below table 1 shanker pulsar 2 shanker Honda 3 shanker car 4 Balu pulsar 5 Balu Honda 6 Balu car 7 Shyam pulsar 8 Jaya Honda 9 Deepa car 10 vasu car

12 Answers   Cognizant, TCS,


Do you know spatial data types - geometry and geography in sql server 2008?

0 Answers  


What is change tracking in sql server?

0 Answers  


Write a sql query to delete duplicate records from a table called table1

0 Answers  


Categories