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 is the diffrence between IN and EXISTS.which one is
faster.

Answer Posted / neha

In the in clause, the inner query is executed first, hence if the inner query return less data than the outer query, then use IN clause, in the other scenario, user exists clause.

Also, in the exists clause the inner query always reference outer query's table, which may or may not be the case with in IN clause.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you rollback after commit?

988


What is trigger and stored procedure in sql?

1037


What is a record in a database?

1063


What is the difference between syntax error and runtime error?

1142


How do I pipe the output of one isql to another?

1006


how to create a new table by selecting rows from another table in mysql? : Sql dba

1107


What is function and procedure?

1033


Compare sql & pl/sql

1142


What is embedded sql in db2?

1020


How do you create a db file?

1018


Define select, insert, create, delete, update, drop keywords

1049


Can we insert delete data in view?

951


What is procedure function?

1063


What is the usage of distinct keyword?

1067


Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

2113