Mega Code Archive

 
Categories / MSSQL Tutorial / Transact SQL
 

Working with Variables

Every variable that you use must be declared, together with its datatype, in a DECLARE statement. You can declare more than one variable at a time in a single DECLARE as long as you separate the variables with commas. Syntax for the DECLARE Statement DECLARE  {@local_variable [AS] data_type}  [,...n]