What is the difference between in and exists.
Ex: select * from emp where empno in(....) and
select * from emp where empno exists(....)
What is the difference between a Join and Union and Union
and UnionAll.
Answer Posted / gopi muluka
IN:Returns true if the column matches to any value in a
subquery or a list.
Exists:Returns true if a subquery contains any row.
Generally EXISTS is faster than IN, because it stops
processing once it finds a row in resultset
Join : Returns only rows which are matching on Joining
Column
Union: Combines two or more resultsets with same number of
columns and displays it as a single resultset by
eliminating duplicate records
Union All: Combines two or more resultsets with same number
of columns,displays it as a single resultset including
duplicate records if any exists
| Is This Answer Correct ? | 16 Yes | 0 No |
Post New Answer View All Answers
What is a collation in ms sql server?
Why I can not enter 0.001 second in date and time literals in ms sql server?
Can sql server 2016 run on windows 7?
what is the primary use of the model database? : Sql server administration
How to get all stored procedures in sql server?
after migrating the dts packg to ssis by using migrtn wizrd in 2005. iam not able to open ssis pack and getting error. what r those errors? how to resolve?
What are the difficulties faced in cube development? : sql server analysis services, ssas
What happens to a statement batch if there is a compilation error?
What is bcnf normalization form?
What is rtm version in sql server?
What is stored in the mssqlsystemresource database? : sql server database administration
What are the limitations in ssrs on sql server express edition?
Define full outer join?
How to create a user name in a database?
Differentiate between sql temp table vs table variable?