Collections:
DECLARE Statements in SQL Server Transact-SQL
How to declare a variable in SQL Server Transact-SQL? How to use the DECLARE statements?
✍: FYIcenter.com
In Transact-SQL, you must use DECLARE statements to declare variables.
Declaring a variable is to define the variable name and the variable data type.
In Transact-SQL, you can:
Here are some example on how to declare variables in Transact-SQL:
DECLARE @country CHAR(3); DECLARE @name NVARCHAR(80), @city NVARCHAR(80); DECLARE @price MONEY = 9.99; DECLARE @now DATETIME = GETDATE();
2017-04-04, 855👍, 0💬
Popular Posts:
Where to find answers to frequently asked questions on Oracle basic concepts? I am new to Oracle dat...
How To Count Duplicated Values in a Column in SQL Server? If you have a column with duplicated value...
How To Define Output Parameters in Stored Procedures in SQL Server Transact-SQL? Sometime a stored p...
How To Create a Stored Function in Oracle? A stored function is a function with a specified name and...
How To Convert Numeric Values to Integers in SQL Server Transact-SQL? Sometimes you need to round a ...