54.2k views
5 votes
Given relation R(A:integer, B:integer). Which of following statements is valid ?

Select one:
a. select * from R where A in all (select A from R);
b. select * from R where A > all (select A from R);
c. select * from R where A not = any (select A from R);
d. select * from R where A = (select A from R);

User Rslemos
by
7.6k points

1 Answer

3 votes

Final answer:

The only valid statement is 'select * from R where A = (select A from R).'

Step-by-step explanation:

Out of the given statements, the only valid one is option d. select * from R where A = (select A from R); This statement will retrieve all the rows from relation R where the value of attribute A is equal to the value returned by the subquery (select A from R). It will only return the rows where the value of A matches exactly with the value returned by the subquery. The other statements (a, b, and c) are not valid because the operators used (in all, > all, and not = any) do not exist in the SQL language. These operators are not recognized by the database system.

User Ken Avila
by
7.8k points