SQL Server 2000 Stored Procedures — Parameter Prefix In Transact-SQL, which symbol indicates a parameter within a stored procedure definition or call?

Difficulty: Easy

Correct Answer: @

Explanation:


Introduction:
T-SQL uses a distinct prefix to denote variables and parameters. Recognizing this prefix is fundamental to writing and reading stored procedures in SQL Server 2000 and later versions.


Given Data / Assumptions:

  • Question concerns SQL Server 2000 syntax (still the same convention today).
  • Focus is on the symbol used for parameters.


Concept / Approach:
In Transact-SQL, both variables and parameters are identified with the at sign character. This provides syntactic clarity and separates parameter names from column names and keywords.


Step-by-Step Solution:
1) Recall T-SQL convention: parameter names start with @.2) Compare with other symbols which have other meanings or none in this context (%, #, &, : ).3) Select the symbol that matches T-SQL parameter notation.


Verification / Alternative check:
Open any CREATE PROCEDURE example in Books Online; parameters are declared as @param datatype.


Why Other Options Are Wrong:

  • #: Used for temporary table names (e.g., #Temp).
  • %: Wildcard in LIKE patterns, not parameter prefix.
  • &: No parameter meaning in T-SQL.
  • : Not used for parameters in T-SQL (PL/SQL uses : in binds).


Common Pitfalls:
Confusing temporary table prefix # with parameters, or mixing Oracle bind syntax with T-SQL.


Final Answer:
@

More Questions from SQL Server 2000

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion