DBA > Job Interview Questions > DB2 INTERVIEW QUESTIONS

What is the difference between IN subselects and

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

What is the difference between IN subselects and EXISTS subselect?

If there is an index on the attributes tested an IN is more efficient since DB2 uses the index for the IN. (IN for index is the mnemonic).
IN subselects can also uesd in corelated sub queries.
IN subselects needs to specify the vlues u want to search.
EXISTS subselects doesn't need any to specify values . it searches for existance of return values from the select statement, if exists the where commits to true and gives the output.

(Continued on next question...)

Other Job Interview Questions