Variables (Transact-SQL)
The scope of a variable is the range of Transact-SQL statements that can reference the variable. The scope of a variable lasts from the point it''s declared until the end of
The scope of a variable is the range of Transact-SQL statements that can reference the variable. The scope of a variable lasts from the point it''s declared until the end of
The New-Variable cmdlet creates a new variable in PowerShell. You can assign a value to the variable while creating it or assign or change the value after it is created.
The value can be a constant or an expression, but it must either match the variable declaration type or be implicitly convertible to that type. For more information, see Expressions.
User-defined variables can be set as read-only. There are naming restrictions for variables (example: you can''t use secret at the start of a variable name). You can use a
To reference a variable in a variable group, you can use macro syntax or a runtime expression. In the following examples, the group my-variable-group has a variable named
When you use a variable in a template that isn''t marked as available in templates, the variable doesn''t render. The variable doesn''t render because its value isn''t accessible within the
PDF version includes complete article with source references. Suitable for printing and offline reading.