What are sub-queries? Give example? In which case
sub-queries are not feasible?

Answers were Sorted based on User's Feedback



What are sub-queries? Give example? In which case sub-queries are not feasible?..

Answer / bernatshaw

Sub-query means a Query within a Query.
This is the Example:
Select Employee_Id, Employee_name From Employees Where
Employee_Id IN (Select Mgr_Id from Manager)

Is This Answer Correct ?    12 Yes 2 No

What are sub-queries? Give example? In which case sub-queries are not feasible?..

Answer / rajendra

Sub query mean query within query ,but when you use sub
query on larg amount data that time it is not feasible

Is This Answer Correct ?    4 Yes 3 No

What are sub-queries? Give example? In which case sub-queries are not feasible?..

Answer / akhil

text and image datatypes are not allowed in
subqueries.Subqueries cannot manipulate their results
internally, that is, a subquery cannot include the order by
clause, the compute clause, or the into keyword.
Correlated (repeating) subqueries are not allowed in the
select clause of an updatable cursor defined by declare cursor.

Is This Answer Correct ?    1 Yes 2 No

What are sub-queries? Give example? In which case sub-queries are not feasible?..

Answer / amit kumar

A subquery is simply a SELECT query within a SELECT query.

example:-

SELECT City, Salary, (SELECT AVG(Salary) FROM Employee)
AS AvgSalary FROM Employee;

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More SQL Server Interview Questions

How do you check sql server is up and running?

0 Answers  


How do you maintain database integrity where deletions from one table will automatically cause deletions in another table?

0 Answers  


What are user defined datatypes and when you should go for them?

1 Answers  


What is the command used to recompile the stored procedure at run time?

0 Answers  


can any one post me, how to remove rows in the below table ENO ENAME EDEPT ELOC 3368 BPS BI Adayar 3371 RAN BI valachari 3369 SRI BI valachari 3372 jay BI Chn - - - - - - - -

2 Answers  






How can you swap values between two rows in a table using single- SQL statement?

1 Answers   Tavant Technologies, Virtusa,


Can sql server be linked with other servers like oracle?

0 Answers  


how to delete duplicate rows from table in sql server

12 Answers   HCL, UHG,


What is right outer join in sql server joins?

0 Answers  


Can you explain different types of locks in sql server?

0 Answers  


How to recreate an existing index in ms sql server?

0 Answers  


How to read data in a table with "select" statements?

0 Answers  


Categories