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
What is impersonation? What are the different impersonation options available in ssas? : sql server analysis services, ssas
How do I know if localdb is running?
How to list all field names in the result set using mssql_field_name()?
Every night you run a full backup after every 3 three hours you make a differential backup every hour you make an incremental backup in a worst-case scenario, how much work you can lose?
What is create command?
What is left outer join in sql server joins?
Write the queries for commands like Create Table, Delete table, Drop Table etc.
What are views used for?
How to create an multi-statement table-valued function?
How to delete duplicate records based on single column from a table?
How to concatenate two character strings together?
Explain aggregate functions?
Indexes are updated automatically is the full-text index also updated automatically?
What is a filestream?
When does a workload on SQL Azure get throttled?