In T-SQL, which of the following is the purpose of the 'WITH' statement?
- Create a Common Table Expression
- Create a derived table
- Specify filter criteria
- Join more than two tables
EXPLANATION
'WITH' allows you to define a Common Table Expression (a derived table that is referenced and can be referred to multiple times within a query). 'WHERE' would usually be used to specify a filter. A derived table would be written as part of the query and can only be referenced in that instance.'JOIN' would be used to join tables together regardless of how many.
See: https://msdn.microsoft.com/en-us/library/ms175972.aspx for more details.
0 comments:
Post a Comment