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
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 |
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 |
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 |
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 |
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 |
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 |
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 |
How to deploy web appliction in web logic ?
What is the types of inheritance?
What does the code "cout<<(0==0);" print? 1) 0 2) 1 3) Compiler error: Lvalue required
Base class has two public data members. How can i derive a new class with one datamember as public and another data member as private?.
How do you answer polymorphism?
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
Input: enter the value:1234 output: 1 2 3 4 write a program to get above output.....
4 Answers Bally Technologies, IBM, SoftSol,
3. Differentiate verification and validation.
What is polymorphism in oop example?
Why we use classes in oop?
What does no cap mean?
what is the usage of clas templates