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 2474
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:

PR is a tangent to a circle with centre O and radius 4 cm at point Q. If ∠POR = 90°, OR = 5 cm and OP = 20/3 cm, then the length of PR is:

A) 16/3 cm B) 23/3 cm
C) 25/3 cm D) 3 cm
 
Answer & Explanation Answer: C) 25/3 cm

Explanation:
Report Error

View Answer Report Error Discuss

8 2474
Q:

Which airport is the busiest airport in the world?

A) Hyderabad B) London
C) Newyork D) Dubai
 
Answer & Explanation Answer: D) Dubai

Explanation:

Dubai airport is the busiest airport in the world.

Report Error

View Answer Report Error Discuss

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

0 2473
Q:

Which generation of computer is still under development?

A) 5th B) 4th
C) 3rd D) 2nd
 
Answer & Explanation Answer: A) 5th

Explanation:

5th generation of computers are still under development depending on the artificial intelligence.

Report Error

View Answer Report Error Discuss

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

3 2473
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 2473
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 2473
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 2472