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 2458
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 2458
Q:

Where is the headquaters of the Universal postal Union

A) Switzerland B) UK
C) Iran D) India
 
Answer & Explanation Answer: A) Switzerland

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Organisations

2 2457
Q:

Read the passage carefully and select the best answer to each question out of the given four alternatives.


The Amazon basin has been continuously inhabited for at least 10, 000 years, possibly more. Its earliest inhabitants were stone-age peoples, living in hundreds of far-flung tribes, some tiny, others numbering in the tens of thousands. It was from the west that Europeans explorers first arrived. In 1541 a Spanish expedition from Quito, led by Gonzalo Pizarro, ran short of supplies while exploring east of the Andes in what is today Peru. Pizarro’s cousin Francisco de Orellana offered to take 60 men along with the boats from the expedition and forage for supplies. De Orellana floated down the Rio Napo to its confluence with the Amazon, near Iquitos (Peru), and then to the mouth of the Amazon. Along the way his expedition suffered numerous attacks by Indians; some of the Indian warriors, they reported, were female, like the Amazons of Greek mythology, and thus the world’s greatest river got its name. No one made a serious effort to claim this sweaty territory, however, until the Portuguese built a fort near the mouth of the river at Belém in 1616, and sent Pedro Teixeira up the river to Quito and back between 1637 and 1639. During the 17th and 18th centuries, Portuguese bandeirantes (groups of roaming adventurers) penetrated ever further into the rain forest in pursuit of gold and Indian slaves, exploring as far as present-day Rondônia, and the Guaporé and Madeira river valleys. Amazonian Indians had long used the sap from rubber trees to make waterproof bags and other items. European explorers recognized the potential value of natural latex, but were unable to market it because it tended to grow soft in the heat, or brittle in the cold, and thus had limited appeal outside the rain forest. However, in 1842 American Charles Goodyear developed vulcanization (made natural rubber durable) and in 1890 Ireland’s John Dunlop patented pneumatic rubber tires. Soon there was an unquenchable demand for rubber in the recently industrialized USA and Europe, and the price of rubber on international markets soared. As profits skyrocketed, so did exploitation of the seringueiros, or rubber tappers, who were lured into the Amazon, mostly from the drought-stricken northeast, by the promise of prosperity only to be locked into a cruel system of virtual slavery dominated by seringalistas (owners of rubber-bearing forests). Rigged scales, hired guns, widespread illiteracy among the rubber tappers, and monopoly of sales and purchases all combined to perpetuate the workers’ debt and misery. In addition, seringueiros had to contend with jungle fevers, Indian attacks and all manner of deprivation.


Where did De Orellano float down to for its confluence with the Amazon?

A) Belem B) Quito
C) Rio Napo D) Peru
 
Answer & Explanation Answer: C) Rio Napo

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 2457
Q:

Who is the author of the book ' The Last Word'

Answer

Hanif Qureishi

Report Error

View answer Workspace Report Error Discuss

2 2456
Q:

When did the capital of India shift from Kolkata to New Delhi?

A) 1911 B) 1951
C) 1931 D) 1901
 
Answer & Explanation Answer: A) 1911

Explanation:

The capital of India shift from Kolkata to New Delhi in the year 1911.

Report Error

View Answer Report Error Discuss

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

6 2456
Q:

In the following question, the sentence given with blank to be filled in with an appropriate word. Select the correct alternative out of the fourand indicate it by selecting the appropriate option

She must ______ a great time at her birthday party.

A) be having B) has
C) be had D) is having
 
Answer & Explanation Answer: A) be having

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: CAT , GRE , TOEFL
Job Role: Bank Clerk , Bank PO

0 2456
Q:

Which High Court has ordered a ban over online sale of medicines across India?

A) Delhi B) Hyderabad
C) Kolkata D) Mumbai
 
Answer & Explanation Answer: A) Delhi

Explanation:

Delhi High Court has ordered a ban over online sale of medicines across India.

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 2456