MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Independent sub query is the one where
A
the inner and the outer query are from two different tables
B
the inner query has no reference to the outer query
C
the inner and outer queries are for the same table but with different condition
D
None of the above
Explanation: 

Detailed explanation-1: -Explanation: Independent sub query is the one where the inner query has no reference to the outer query. Explanation: Join can be replaced by inner join.

Detailed explanation-2: -An INDEPENDENT SUBQUERY is a subquery that can be run on its own, without the main subquery. We will be using the Football Delphi database, which can be downloaded here. If you are not familiar with the database, now is a good time to review the different tables and columns in each table.

Detailed explanation-3: -In a SQL database query, a correlated subquery (also known as a synchronized subquery) is a subquery (a query nested inside another query) that uses values from the outer query. Because the subquery may be evaluated once for each row processed by the outer query, it can be slow.

Detailed explanation-4: -A subquery that uses an outer reference is a correlated subquery. An outer reference is a column name that does not refer to any of the columns in any of the tables in the FROM clause of the subquery. Instead, the column name refers to a column of a table specified in the FROM clause of the main query.

Detailed explanation-5: -Subqueries are correlated when the inner and outer queries are interdependent, that is, when the outer query is a query that contains a subquery and the subquery itself is an inner query. Users that know programming concepts may compare it to a nested loop structure.

There is 1 question to complete.