Answer Posted / mkd
A subquery is a SELECT statement that is nested within
another T-SQL statement. A subquery SELECT statement if
executed independently of the T-SQL statement, in which it
is nested, will return a result set. Meaning a subquery
SELECT statement can standalone and is not depended on the
statement in which it is nested.
Sometimes the criteria for determining which set of records
will be affected by a SELECT, UPDATE, DELETE and/or INSERT
statement cannot be obtained by hard coding the selection
criteria. Occasionally there is a need to use the results
of a SELECT statement to help determine which records are
returned or are affected by a T-SQL statement. When a
SELECT statement is used inside another statement, the
inside SELECT statement is known as a subquery.
| Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
How to transfer data from a cursor to variables with a "fetch" statement?
What xml support does the sql server extend?
What is the parse query button used for?
What is the difference between drop table and truncate table?
What is user defined stored procedures?
Why use identity in sql server?
What command must you use to include the not null constraint after a table has already been created?
What is the difference between for auto and for nested?
What is query cost in sql server?
What are the types of database recovery models?
Explain few of the new features of sql server 2008 management studio
What are the different types of Indexes available in SQL Server?
Can two different columns be merged into single column? Show practically?
Explain the difference between clustered and non-clustered index?
How to create a large table with random data for index testing in ms sql server?