What is a sub-query? When would you use one?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / c suresh kumar
sub query is part of main query.this useful we retrive data
from the another table.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / swapna
Subquery is used to get information from a table based on
unknown conditions.
If select stmt not perform entire task using
selection,projection,and joins then we can perform that
type of task using sub queries.
| Is This Answer Correct ? | 3 Yes | 8 No |
What is impersonation? What are the different impersonation options available in ssas? : sql server analysis services, ssas
How do you find the error, how can you know the number of rows effected by last SQL statement?
Distinguish between nested subquery and correlated subquery?
What do you mean by sql server 2005 express management tools?
What are the different types of cursor?
You want to check the syntax of a complicated update sql statement without executing it. What command should you use?
What is implicit mode in sql server?
What is merge replication?
Explain what is use of dbcc commands?
what purpose does the model database serve? : Sql server database administration
How many index can be created for single table
4 Answers CarrizalSoft Technologies, Verizon,
A successfully created SSIS package in SQL Server 2005 runs fine in MS BIDS and Integration Services. But gives error when run through an SQL-Job. What are the possible reasons?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)