You attempt to query the data base with this command:
SELECT name, salary FROM employee WHERE salary=(SELECT
salary FROM employee WHERE last name='Wagner' OR dept no=233)

Choose most appropriate option from the following:
1)Sub-queries are not allowed in the where clause.
2)a multiple row sub-query used with a single row comparison
operator.
3)a single row query is used with a multiple row comparison
operator.

Answers were Sorted based on User's Feedback



You attempt to query the data base with this command: SELECT name, salary FROM employee WHERE salar..

Answer / sharmaamitanand

In my knowlenge if i run this query,the subquery is likely
to return more than single rows as resultset as OR condition
is used so 3rd option is likely to be occured.

Is This Answer Correct ?    26 Yes 4 No

You attempt to query the data base with this command: SELECT name, salary FROM employee WHERE salar..

Answer / r

option b is correct...

Is This Answer Correct ?    11 Yes 2 No

You attempt to query the data base with this command: SELECT name, salary FROM employee WHERE salar..

Answer / nitin

option b is correct because we can not compare more than one values with single value using '=' operator.

Is This Answer Correct ?    9 Yes 0 No

You attempt to query the data base with this command: SELECT name, salary FROM employee WHERE salar..

Answer / raghavan

Actually the query may return more than one row.
Hence "is" should be used in place of "=".
So the best answer would be the third choice.

Is This Answer Correct ?    11 Yes 4 No

You attempt to query the data base with this command: SELECT name, salary FROM employee WHERE salar..

Answer / r

Sorry ...frgot explain why it is 2nd option....everyone
explained it right ..but the answer choosen is incorrect...

Is This Answer Correct ?    6 Yes 0 No

You attempt to query the data base with this command: SELECT name, salary FROM employee WHERE salar..

Answer / rupali

Option 2 is correct.

Is This Answer Correct ?    3 Yes 0 No

You attempt to query the data base with this command: SELECT name, salary FROM employee WHERE salar..

Answer / girish

Final Answer is 'Option 2' . Read option 2 and 3
carefully, u will get to know why 2 is correct.

Is This Answer Correct ?    2 Yes 0 No

You attempt to query the data base with this command: SELECT name, salary FROM employee WHERE salar..

Answer / dilip

the answer is b becouse the query the query compares one
row at a time and there is multiple rows generated in
subqueries

Is This Answer Correct ?    2 Yes 1 No

You attempt to query the data base with this command: SELECT name, salary FROM employee WHERE salar..

Answer / vicky

SELECT name, salary FROM employee WHERE salary=(SELECT
salary FROM employee WHERE last name='Wagner' OR dept
no=233)

Choose most appropriate option from the following:
1)Sub-queries are not allowed in the where clause.
2)a multiple row sub-query used with a single row comparison
operator.
3)a single row query is used with a multiple row comparison
operator.
4)logical aparatous are not allowed in where clause .

Is This Answer Correct ?    0 Yes 2 No

You attempt to query the data base with this command: SELECT name, salary FROM employee WHERE salar..

Answer / manish

Option 3 is right

Is This Answer Correct ?    3 Yes 7 No

Post New Answer

More OOPS Interview Questions

Is abstract thinking intelligence?

0 Answers  


Write a program to find out the number of palindromes in a sentence.

1 Answers   TCS,


How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction

0 Answers  


What is class and object with example?

0 Answers  


why c++ is called OOPS? waht is inherutance? what is compiler?

5 Answers  






Who invented oop?

0 Answers  


#include <iostream> using namespace std; int main() { int a = 3; int c[5][5]; for (int x=0;x<5;x++) { for (int y=0;y<5;y++) { c[x][y] = x*y; } } cout << c[a][2]; }

1 Answers  


what is a virtual class?

5 Answers   Cap Gemini, IBM, Infosys, Trinity Technologies,


Prepare me a program for the animation of train

0 Answers  


What is advantage of inheritance?

0 Answers  


Write a C++ program to conduct an election of a mayor.Declare a class ELECTION With the following specification: Data member: Name 25 character Age Integer symbol 1 character Member functions: To accept data for 20 contestant To accept symbol as voting from 100 voters. To declare the winner and the loser.

1 Answers   Global Academy, Infotech,


Difference between realloc() and free?

9 Answers   HP,


Categories