Questions

Q:

A subquery in an sql select statement.

Answer

A Subquery or Inner query or a Nested query is a query within another SQL query and embedded within the WHERE clause.


Subqueries are most frequently used with the SELECT statement. The basic syntax is as follows::


SELECT column_name [, column_name ]
FROM table1 [, table2 ]
WHERE column_name OPERATOR
(SELECT column_name [, column_name ]
FROM table1 [, table2 ]
[WHERE])



A subquery is used to return data that will be used in the main query as a condition to further restrict the data to be retrieved.


Subqueries can be used with the SELECT, INSERT, UPDATE, and DELETE statements along with the operators like =, <, >, >=, <=, IN, BETWEEN, etc.


 


There are a few rules that subqueries must follow −


 


1. Subqueries must be enclosed within parentheses.


2. A subquery can have only one column in the SELECT clause, unless multiple columns are in the main query for the subquery to compare its selected columns.


3. An ORDER BY command cannot be used in a subquery, although the main query can use an ORDER BY. The GROUP BY command can be used to perform the same function as the ORDER BY in a subquery.


4. Subqueries that return more than one row can only be used with multiple value operators such as the IN operator.


5. The SELECT list cannot include any references to values that evaluate to a BLOB, ARRAY, CLOB, or NCLOB.


6. A subquery cannot be immediately enclosed in a set function.


7. The BETWEEN operator cannot be used with a subquery. However, the BETWEEN operator can be used within the subquery.

Report Error

View answer Workspace Report Error Discuss

0 2475
Q:

As a result of wartime production

A) more women volunteered for noncombat groups B) the government borrowed money from citizens
C) people needed government aid to survive D) the average work week for people increased
 
Answer & Explanation Answer: D) the average work week for people increased

Explanation:

As a result of wartime production, the average work week for people increased.

Report Error

View Answer Report Error Discuss

Filed Under: World History
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

1 2474
Q:

Plants that are more rare today are

A) Hydrophytes B) Xerophytes
C) Mesophytes D) None of the above
 
Answer & Explanation Answer: A) Hydrophytes

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

2 2474
Q:

Improve the bracketed part of the sentence.
The patient died (of a wound and not of) cancer.

A) from a wound and not of B) of a wound and not from
C) from a wound and not from D) no improvement
 
Answer & Explanation Answer: A) from a wound and not of

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 2474
Q:

In the given question, a part of the sentence is printed in bold. Below the sentence, three alternatives to the bold part are given which may help improve the sentence. Choose the option that reflects the correct use of the phrase in the context of the sentence. In case the given sentence is correct, your answer is (E) i.e. No correction required. Living in the heart of New York city is certainly like a far cry from living in the rural countryside. (i) heart of New York city is certainly a far cry from (ii) heart of New York city is a far cry than (iii) heart of the New York city is certainly ruing

A) Only (i)  B) Only (ii)
C) Only (iii) D) Both (ii) and (iii)
 
Answer & Explanation Answer: A) Only (i) 

Explanation:
The part of the sentence that is most important in this sentence is ‘a far cry.’ It means ‘vastly different from.’ But here this phrase has not been used in the correct way except option 1.
Report Error

View Answer Report Error Discuss

Filed Under: English

0 2474
Q:

In the following question, a sentence has been given in Direct/Indirect speech. Out of the four alternatives suggested, select the one, which best express the same sentence in Indirect/Direct speech.


Kunal said, "Tanu is coming this week."

A) Kunal says that Tanu was coming that week. B) Kunal says that Tanu was coming this week.
C) Kunal said that Tanu was going to be come this week. D) Kunal said that Tanu was coming that week.
 
Answer & Explanation Answer: D) Kunal said that Tanu was coming that week.

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: AIEEE , Bank Exams , CAT

0 2474
Q:

Choose the word that best defines the given phrase‘Prolonged inability to sleep’

A) Amnesia B) Utopia
C) Nausea D) Insomnia
 
Answer & Explanation Answer: D) Insomnia

Explanation:
Amnesia means a partial or total loss of memory.
Utopia means an imagined place or state of things in which everything is perfect.
Nausea means a feeling of sickness with an inclination to vomit.
Insomnia means habitual sleeplessness; inability to sleep
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 2474
Q:

Burning the candle at both ends meaning

A) To consume a lot B) To overwork
C) To overtake D) None of the above
 
Answer & Explanation Answer: B) To overwork

Explanation:

Burning the candle at both ends meaning is to overwork starting early in the morning and staying till late nights.

Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

0 2474