Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context:
SQL Server has a list of reserved keywords (e.g., SELECT, FROM, TABLE). If you want to use such a word as the name of a table, column, or other object, you must delimit it so the parser treats it as an identifier and not as part of SQL syntax.
Given Data / Assumptions:
Concept / Approach:
SQL Server supports two delimiter styles for identifiers: square brackets [name] and double quotes "name" (with QUOTED_IDENTIFIER ON). Using brackets is the most common T-SQL approach. Without delimiters, a reserved word cannot be parsed as an identifier and will cause errors or ambiguous parsing. While best practice is to avoid reserved words entirely, bracketed or quoted identifiers are the supported escape mechanism.
Step-by-Step Solution:
Verification / Alternative check:
Test statements in SSMS; review the list of reserved keywords in Microsoft documentation and note parsing failures without delimiters.
Why Other Options Are Wrong:
Common Pitfalls:
Building ORMs or code generators that emit un-delimited reserved names; changing QUOTED_IDENTIFIER unexpectedly.
Final Answer:
Correct
Discussion & Comments