What is subquery ?

Answers were Sorted based on User's Feedback



What is subquery ?..

Answer / s

Subquery is a SELECT statement used within a WHERE clause
or having CLAUSE of an SQL statment.

Is This Answer Correct ?    26 Yes 5 No

What is subquery ?..

Answer / xx

A query embedded inside another (parent) SQL statement,
returning rows used by the parent.

Is This Answer Correct ?    15 Yes 6 No

What is subquery ?..

Answer / v.chellappa

Usally subquery is executed first then result return to the
main query.
Based on the returned value the main querey is executed

Is This Answer Correct ?    7 Yes 1 No

What is subquery ?..

Answer / kinjal patel

subquery is a slect statement that is embaded in clause of
another sql statement ,called the parent statement.

Is This Answer Correct ?    3 Yes 0 No

What is subquery ?..

Answer / pooja intwala

A subquery is a SELECT statement within another SQL statement. The SQL statement can be SELECT, WHERE clause, FROM clause, JOIN, INSERT, UPDATE, DELETE, SET, DO, or another subquery.

Is This Answer Correct ?    0 Yes 0 No

What is subquery ?..

Answer / navdeep gill

subquery can be define sa a select query that erturns
single or multiple values

Is This Answer Correct ?    3 Yes 5 No

Post New Answer

More DB2 Interview Questions

What is a correlated sub query?

2 Answers  


Is db2 a mainframe database?

0 Answers  


When is the access path determined for dynamic SQL?

2 Answers  


quary for 1> fetch last record 2> fetch in reverse order 3> fetch last 5 row 4> fetch second last record (their is no primary key) i think concept of count can be use for this in 4th

5 Answers  


Can you tell me how can you find out the # of rows updated after an update statement?

0 Answers  






What are db2 tables?

0 Answers  


what are the frequent DB2 abends did you encounter in your programs ?? What are different SQL abends ??

4 Answers   Xansa,


can any one expalin check point with an example?

1 Answers  


How to resolve -805 error in DB2?

1 Answers   Cap Gemini,


SET is the ANSI standard for variable assignment, SELECT is not. SET can only assign one variable at a time, SELECT can make multiple assignments at once. If assigning from a query, SET can only assign a scalar value. If the query returns multiple values/rows then SET will raise an error. SELECT will assign one of the values to the variable and hide the fact that multiple values were returned (so you'd likely never know why something was going wrong elsewhere - have fun troubleshooting that one) When assigning from a query if there is no value returned then SET will assign NULL, where SELECT will not make the assignment at all (so the variable will not be changed from it's previous value) As far as speed differences - there are no direct differences between SET and SELECT. However SELECT's ability to make multiple assignments in one shot does give it a slight speed advantage over SET.

0 Answers  


What are the various locks available?

5 Answers   CTS,


Is schema the same as database?

0 Answers  


Categories