declare nvarchar variable code example
Example 1: how to declare a variable in sql
DECLARE @COURSE_ID AS INT, @COURSE_NAME VARCHAR (10);
Example 2: sql declare variable single line
-- Old clunky way of doing things prior to SQL Server 2008
DECLARE @myVar VARCHAR(100);
SET @myVar = 'Some Value';
-- New, amazing way of declaring variables
DECLARE @myVar VARCHAR(100) = 'Some Value';