What is the difference between join and union.

Answer Posted / sompalli krishna

Join: joins are used to combine the columns from one or
more tables(join using one table is possible for self
join).output should B more than one column.
It is constraint based.Columns r joined based on similar
column names and datatypes also on both the tables.

union: union is used to combine the columns from one or
more tables.Output should B one column.
It is not constraint based.Any no. of columns can be
combined without using any condition.But the data types
should be same immaterial to column names.
Contact me for any queries on 09885790989

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use boolean type in select statement?

583


How do I clear the screen in sql plus?

553


Define sql delete statement.

568


Explain lock escalation? : Transact sql

706


how to return query output in html format? : Sql dba

651






How many postgresql users are there, worldwide?

580


What is the use of index in hive?

548


What does fetching a cursor do?

617


Is the primary key an index?

597


What is sql integrity?

585


How do I know if I have sql express or standard?

604


What is exception? What are the types of exceptions?

558


How to generate a salary slip like jan 1000 1000 feb 1000 2000 ... dec 1000 12000

1645


Is stored procedure faster than query?

565


Table A Table B 1 1 2 1 3 1. Union & union all --> A Union B , A Union all B 2. Minus , Intersect --> A minus B , B Minus A , A Intersect B 3. Joins A join B , A Left Join B A Right Join B , A full Join B 4. %Type - Uses & Benifit 5. Truncate & Delete 6. Pragma Autonomus Transaction 7. how to Perform DDL from function or procedure 8. Can we have DML inside Function 9. Rank & Dense Rank diffrence 10. Water Mark in Oracle 11. Index , Can we have index in all column of table if no then why ?

537