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

I have an eye but cannot see?

Answer

Its a Needle. Needle has an eye but can't see.

Report Error

View answer Workspace Report Error Discuss

6 2298
Q:

If velocity is constant then acceleration is what?

A) constant B) increasing
C) 0 D) infinite
 
Answer & Explanation Answer: C) 0

Explanation:

If an object moves with some velocity that means the magnitude and direction of the object changes i.e, the object moves with some acceleration. Hence, if the object moves with constant velocity, no change in direction and magnitude of speed i.e, no acceleration = 0 acceleration.

Report Error

View Answer Report Error Discuss

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

6 2298
Q:

The diploid generation of the plant life cycle always

A) produces eggs and sperm B) produces spores
C) is called the gametophyte D) develops from a spore
 
Answer & Explanation Answer: B) produces spores

Explanation:
Report Error

View Answer Report Error Discuss

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

0 2298
Q:

Who has become the 1st Indian transgender to be honoured with Padma Shri?

A) Kalki Subramaniam B) Madhu Kinnar
C) Narthaki Nataraj D) Rudrani Chettri
 
Answer & Explanation Answer: C) Narthaki Nataraj

Explanation:

Narthaki Nataraj has become the 1st Indian transgender to be honoured with Padma Shri.

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

What is Non-Maskable interrupts?

Answer

An interrupt which can be never be turned off (ie. disabled) is known as Non-Maskable interrupt

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 2297
Q:

Can You Guess The Missing Numbers In The Given Math Puzzle?

A) B)
C) D)
 
Answer & Explanation Answer: A)

Explanation:

Let the missing numbers be x, y, a and b

x + y = 8 ---- (1)
a - b = 6 ---- (2)
x + a = 13 --- (3)
y + b = 8 ---- (4)

2x + a + y = 21 --- From (1 & 3)
a + y = 14 ----  From (2 & 4)

Substitute (2 & 4) in (1 & 3)

2x + 14 = 21
2x = 7
x = 3.5

From (1) ---> 3.5 + y = 8
=> y = 8 - 3.5 = 4.5

a + y = 14 => a = 14 - y = 14 - 4.5 => a = 9.5
From (4) ---- y + b = 8 => b = 8 - y = 8 - 4.5 = 3.5

Hence,
x = 3.5
y = 4.5
a = 9.5
b = 3.5

Report Error

View Answer Report Error Discuss

Filed Under: Math Puzzles
Exam Prep: CAT , Bank Exams

14 2297
Q:

If depreciation exceeds gross investment

A) the economy's stock of capital is growing B) the economy's stock of capital may be either growing or shrinking
C) net investment is zero D) the economy's stock of capital is shrinking
 
Answer & Explanation Answer: D) the economy's stock of capital is shrinking

Explanation:
Report Error

View Answer Report Error Discuss

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

0 2297