What is a named variable and why use it?
-
What is a named variable and why use it? The variable @namedVariable is a "named variable." The "@" prefix is required for SQL Server named parameters.
-
What is a named variable and why use it? The variable @namedVariable is a "named variable." The "@" prefix is required for SQL Server named parameters.
kenn_rosie wrote:
What is a named variable and why use it?
It can be used like a variable in a stored procedure, or passed as a parameter to a query. Why use a variable in any programming language? Also, for security in passing data through from client applications. See SQL Injection Attacks and Tips on How to Prevent Them[^] ColinMackay.net "Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius "If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell