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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Why SQL Agent is used?

602


How to convert a unicode strings to non-unicode strings?

565


What is the difference between deallocate cursor and close cursor?

727


What are the disadvantages of using the stored procedures?

553


What are the system database in sql server 2008?

581






What are the two modes of authentication in sql server?

526


Does sql server use java?

523


What is the maximum size of column in sql server?

511


What is an sql server agent?

551


What is sql server english query?

547


What are trace files?

535


Explain the etl (extraction, transformation, and loading)?

567


What is scan table/view and seek table/view when its occurs? : sql server database administration

539


What is a with(nolock)?

581


Can I use sql azure as a backup with log shipping or database mirroring?

136