In T-SQL, which of the following is NOT a requirement to define a table expression?
- All columns must have a name
- Column names must be unique
- Must be preceded by WITH
- Cannot use ORDER BY to guarantee presentation order
EXPLANATION
Table expressions in SQL Server are named query
expressions that represent a valid relational table. SQL Server
supports four types of table expressions: Common Table Expressions
(CTEs), Derived Tables, Views and In-line Table-Valued Functions. Only a
CTE definition needs to be preceded by WITH.
T-SQL
allows the ORDER BY clause in conjunction with TOP, OFFSET or FOR XML
for processing purposes, but this does not guarantee presentation order
in an outer query that references the table expression.
0 comments:
Post a Comment