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

Which are ddl commands?

542


What is an indice?

577


What are the advantages to use stored procedures?

572


Introduction of rollup clause using sum and group by clause?

538


What is shrink log file?

514






What is partition index in sql server?

608


The external application that is executed in one of the tasks does not have a log file, but only a screen log. How can I save the data from the screen? : sql server management studio

526


What is an entity-relationship diagram (erd)?

588


What keyword you will use to get schema appended to the result set of a ‘for xml’ query?

603


Explain about local stored procedure?

508


What is a covering index?

536


Explain difference between cross join and full outer join?

561


How to execute a sql statement using odbc_exec()?

574


What is function of ROLLUP ?

658


What is change data capture (cdc) feature?

592